Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Update "master" branch.
    Code Block
    > git pull upstream master
    
  2. Create a new feature-branch "feature1"
    Code Block
    > git branch feature1 master
    
    > git checkout feature1
    
  3. Do some work on your feature, add and commit it
    Code Block
    > git add File1, File2
    > git commit -m "Working my feature"
    
  4. 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"
    
  5. 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
    
  6. "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
    
  7. Push up to github
    Code Block
    > git push origin feature1
    
  8. Issue pull request
  9. 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

Developing with Git source controlled projects