Skip to content

Instantly share code, notes, and snippets.

@ranbena
Last active December 15, 2015 02:09
Show Gist options
  • Save ranbena/5185463 to your computer and use it in GitHub Desktop.
Save ranbena/5185463 to your computer and use it in GitHub Desktop.
git workflow
git stash
git checkout master
git checkout -b bugfix
// work on fix
git commit -am 'fixed the bug'
git checkout master
git merge bugfix
// deploy
git checkout christmas-design
git stash pop
// ezpz
git checkout v1.0
git merge bugfix
git branch -d bugfix
// make sure base branch is up to date
git checkout v1.0
git pull
// rebase feature branch
git checkout christmas-design
git rebase v1.0
// merge into v1.0
git checkout v1.0
git merge christmas-design
commit c5732ae9136316dc1be08e9a36123b93ca0cabf6
Merge: 4e84d12 37038a1
Author: Ran Ben Aharon <[email protected]>
Date: Tue Mar 17 16:59:16 2013 +0200
Merge branch 'master' into feature-branch
commit 9ec4d3100f0da2243f63c85045b4eb53a5e67fc4
Author: Ran Ben Aharon <[email protected]>
Date: Thu Mar 17 16:52:22 2013 +0200
Fixed major bug
commit 95caf3b9fd93b2a0d51485f5719c866d4388b73e
Author: Ran Ben Aharon <[email protected]>
Date: Sun Mar 17 16:58:06 2013 +0200
Christmas design
commit 84e865d121de0737dd9ec90984c441f1082625a3
Author: Avvy Tron <[email protected]>
Date: Sun Mar 16 16:29:59 2013 +0200
Added footer
commit 4e68e61128e5abaa1c1b2cac2c2d4e22b56b41ac
Author: Crivo Lotias <[email protected]>
Date: Sun Mar 12 10:56:14 2013 +0200
Fixed meta content
commit 95caf3b9fd93b2a0d51485f5719c866d4388b73e
Author: Ran Ben Aharon <[email protected]>
Date: Sun Mar 17 16:58:06 2013 +0200
Christmas design
commit 9ec4d3100f0da2243f63c85045b4eb53a5e67fc4
Author: Ran Ben Aharon <[email protected]>
Date: Thu Mar 17 16:52:22 2013 +0200
Fixed major bug
commit 84e865d121de0737dd9ec90984c441f1082625a3
Author: Avvy Tron <[email protected]>
Date: Sun Mar 16 16:29:59 2013 +0200
Added footer
commit 4e68e61128e5abaa1c1b2cac2c2d4e22b56b41ac
Author: Crivo Lotias <[email protected]>
Date: Sun Mar 12 10:56:14 2013 +0200
Fixed meta content
git rebase -i HEAD~14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment