Skip to content

2.0.0 Working with Git

smutniak edited this page Jul 15, 2019 · 1 revision
  1. Create a local working branch
git branch working
  1. Go to your local working branch
git checkout working
  1. Make changes
hack hack hack hack
  1. Commit changes
git add -A  
git commit -m 'lots of cool stuff'
  1. Get updates from remote server and switch back to the develop branch
git fetch 
git checkout develop
  1. If the git fetch pulled updates from the server, then:
git merge origin/develop  
git checkout working 
git rebase develop 
git checkout develop  
git merge working 
git push origin develop
  1. If you get a conflict on the push to origin (last line), you'll need to rebase your local changes on top of the remote branch:
git rebase origin/develop
  1. And then re-push:
git push origin develop  
  1. Else if the git fetch didn't pull any updates from the server, then:
git merge working 
git push origin develop  
  • You can use gitx —all at any time to see the history of each branch.

  • When you're ready to develop more code, go back to step 2.

  • You can use multiple working branches if you are developing multiple features at once that you don't want to mix together. Just create a different local branch and replace working above with your local branch name.