This workflow assumes upstream is the main repo, and origin is your fork.
Command | Description |
---|---|
git checkout release |
get back to release |
git pull upstream release |
pull down new code (or do a fetch and then checkout upstream/release) |
git checkout -b 'feature-branch-name' |
Checkout a branch (it can be any name) |
Make your changes | (bang on your keyboard) |
git status |
Shows you which files you changed, use this often |
git diff |
shows you your actual changes. hit q to exit git diff. |
git add -A |
adds new files you may have added, not necessary if you only modified existing files |
git commit -a -m "I added this..." |
Commit changes locally |
git pull upstream release |
Pull in any new changes from upstream that other people have already pushed |
git push origin feature-branch-name |
Push up to github |
Submit a pull request in github | Go to the main repo or your fork and click the green button. Then "compare across forks". Then Submit, or merge if you have permission. |
Don't forget you can make as many branches as you want too. They will only live on your machine and you can always just delete them if you no longer need those changes.