![]() To do that we add the following entry into our. Next, identify the commits you want to squash. Squashing commits can be done in a few ways, where your end goal is to rewrite the commit history and leave just one commit instead of multiple. You can check your current branch by running git branch. The last piece missing now is that we also want to have it as a proper git alias. To squash commits into one patch using git format-patch, follow these steps: First, make sure you’re in the branch you want to squash commits in. git-squash master "Implement new feature" and it will squash all commits of the branch we are currently working on and put it into a new commit with the message “Implement new feature”. If then echo "Squashed into new commit \" $commitMsg \"" exit 0 fi exit 1 Git commit -m " $commitMsg " 1> /dev/null $currentBranch ) \n\n" git reset -soft $baseCommit
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |