...
- Update "master" branch.
Code Block > git pull upstream master
- Create a new feature-branch "feature1"
Code Block > git branch feature1 master > git checkout feature1
- Do some work on your feature, add and commit it
Code Block > git add File1, File2 > git commit -m "Working my feature"
- OPTIONAL: When you're ready to push up, squash all of your commits together first
Code Block > git reset --soft master > git commit -m "unified feature commit"
- When you're ready to push your work up to get pulled in, make sure you're up-to-date first
Code Block > git checkout master > git pull upstream master
- "master" is now up-to-date. Switch back to your branch and rebase your work on top of the new "master"
Code Block > git checkout feature1 > git rebase master
- Push up to github
Code Block > git push origin feature1
- Issue pull request
- When processed, update "master" to pull down your official change, delete "feature1"
Code Block > git checkout master > git pull upstream > git branch -D feature1
...
Code Block |
---|
git branch myRestoredBranch 724d9acd |