Here we are using the Git Bash command line.
Paths are relative to your current directory
Get the latest updates from GitHub
Unless you are working on your fork, make it a habit to pull:
- before you start every morning
- frequent during the day
- before you start a commit
Resolve any merge conflicts.
Check local changes
Checking status "all the time"? Create a convenient shorthand:
git config --global alias.st status
The next time you can just type
git st. (Don't worry,
git status will still work.)
Inspect commit log
Saving changes to your repository
Tell Git what you want to save.
git add --all
git add .
- A specific folder (recursive):
git add docs/onsite
- A specific file:
git add docs/index.md
If you have moved or renamed a file without using
git mv, you must add both the old and the new file or folder name!
Commit your saved changes to your local repository.
git commit -m "#[ISSUE ID] Short description of changes"
Send your changes to GitHub.
- If you didn't set the upstream when you created the branch, you need to do it now:
git push --set-upstream origin <branchname>
You've done it! Your code is now up in your GitHub repository!
Need to fix something you submitted? No problem! Just make your changes in the same branch and then commit and push again.