Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git squash commits on branch

Another way to squash all your commits is to reset the index to master:

git checkout yourBranch
git reset $(git merge-base master $(git branch --show-current))
git add -A
git commit -m "one commit on yourBranch"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #git #squash #commits #branch
ADD COMMENT
Topic
Name
8+4 =