Created
December 11, 2018 14:51
-
-
Save leolanese/18bf65c95419a4aa39c790e1d905eac3 to your computer and use it in GitHub Desktop.
GIT SQUASHING (another branch):
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 characters
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