macOS
On macOS it's usually more convenient to use brew than download files from the web.
brew install git
If you don't have brew, We highly recommend to install it.
Linux
Use your package manager, e.g. apt-get install git
Windows
Download Git from the official page: https://git-scm.com/download/win
-
Go to the project repository you want to work on, e.g. https://github.com/msd-code-academy/lessons and fork the repository
-
Clone your newly created repository:
git clone <url-of-your-repo>
Copypasting url from browser is enough.
-
Create new branch
Don't push changes directly to the master, instead use branches so we can do Code Review with pull requests
git checkout -b <some-name-for-your-branch>
-
Commit & push your changes
git add * git commit -m 'New cool stuff added' git push
-
Create pull request
- Go back to your Github repository
- Click on "New pull request"
- Select your branch in second dropdown you want to merge
- You can use "Reviewers" in right panel to assign someone, e.g. some lectors, to review your changes
Tip: Use ssh keys instead of username/password:
- Go to github.com/settings/keys or by clicking on your icon in righ top panel > settings > SSH and GPG keys
- Click on new SSH key and provide the ssh key (usually located in ~/.ssh/id_rsa.pub), the title doesn't matter, it's just info for you
- See Github help if you need advice
- git - the simple guide - Great introductory guide if you don't know much about git.
- Try Git - Learn by doing, for beginners to git
- Learn Git Branching - the most visual and interactive way to learn Git on the web
- Github Hello World - Introductory guide to Github
- Git DOCs - official docs
- Gitflow - original article about common flow