Skip to content

Instantly share code, notes, and snippets.

@evanhammer
Created May 28, 2015 21:54
Show Gist options
  • Save evanhammer/872e087990eb5f50c88d to your computer and use it in GitHub Desktop.
Save evanhammer/872e087990eb5f50c88d to your computer and use it in GitHub Desktop.
How to create awesome git branches.
(dev): git pull > dev and origin/dev are in sync
(dev): git branch feature-name > dev and feature-name are in sync
(dev): git checkout feature-name
(feature-name): ....make your changes...
(feature-name): git commit -m "Great message." > dev and feature-name are not in sync.
(feature-name): git checkout dev
...evan makes changes and pushes them to origin/dev
(dev): git pull > origin/dev and dev are in sync, but feature-name is not.
(dev): git checkout feature-name
(feature-name): git rebase dev > you'll have to resolve conflicts.
(feature-name): git checkout dev
(dev): git merge feature-name --no-ff > dev and feature-name are now in sync
(dev): git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment