Skip to content

Instantly share code, notes, and snippets.

@leolanese
Created December 11, 2018 14:51
Show Gist options
  • Save leolanese/18bf65c95419a4aa39c790e1d905eac3 to your computer and use it in GitHub Desktop.
Save leolanese/18bf65c95419a4aa39c790e1d905eac3 to your computer and use it in GitHub Desktop.
GIT SQUASHING (another branch):
GIT SQUASHING (another branch):
ok, do work on branches branches … lalala
git add -A
git commit -m 'TEAM-XXX'
Switch to the master branch and make sure you are up to date:
git checkout master && git fetch && git pull
Merge your feature branch into the master branch locally:
git merge WF-xxxx
Reset the local master branch to origin's state:
git reset origin/master
Now all of your changes are considered as unstaged changed: M.
You can stage and commit them into one or more commits.
git checkout -b WF-xxxx-squash
So, now work as normal:
git add -A
git commit -m ‘WF-xxxx: something header component + unit-test'
git push origin WF-xxxx
+
TEAM-XXXX:
git rebase master then
IF we have conflicts (it will create a new rebase branch):
fix them with IDE git view conlifcs
git rebase —continue
GIT SQUASHING:
https://gist.github.com/patik/b8a9dc5cd356f9f6f980
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment