My Git Commit Process – squash, rebase, commit

SQUASH ALL THE COMMITS TO YOUR FEATURE BRANCH INTO ONE COMMIT
git rebase -i HEAD~4 (where 4 is the amount of commits you wish to squash)
ONCE ALL COMMITS ARE SQUASHED INTO ONE, ENSURE TO ORIGINAL BRANCH IS UP TO DATE
git checkout master
git pull origin master
NOW THAT ORIGINAL IS UP TO DATE, REBASE
git checkout myFeatureBranch
git rebase – i master
DELETE REMOTE VERSION OF FEATURE BRANCH
git push origin :myFeatureBranch
PUSH TO REMOTE REPO
git push origin myFeatureBranch

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: