Created
October 20, 2015 20:28
Revisions
-
nuweb created this gist
Oct 20, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ 1. Branch off of develop. $ git checkout -b feature/myfeature develop 2. Squash commits into one commit Open github and figure out how many commits to go back $ git rebase -i head~(number of commits) - You can remove commits in editor by doing {command K}. - Save! 3. Checkout develop and make sure it's up to date $ git checkout develop $ git pull 4. Checkout feature branch and rebase develop $ git checkout feature/myfeature $ git rebase develop 5. Use merge tool, resolve conflicts, and continue rebasing after diff merge $ git status $ git mergetool $ git rebase --continue 5. Force Push feature branch $ git push -f 6. Checkout develop and merge the feature branch $ git checkout develop $ git merge feature/myfeature 7. Push $ git push 8. Delete the feature branch $ git branch -D myfeature Notes: If anything goes wrong abort the rebase, delete and pull the feature branch and start again. git rebase --abort git branch -D myfeature