Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- if "%1"=="" goto blank
- echo Squashing %1 commits...
- git reset --soft HEAD~%1
- git log --format=%%B%%n --reverse "HEAD@{1}" -n %1 > _msg.txt
- git commit -t _msg.txt
- del _msg.txt
- echo Done!
- goto end
- :blank
- echo Missing parameter: number of commits to squash.
- exit /B 1
- :end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement