Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. @echo off
  2.  
  3. if "%1"=="" goto blank
  4.  
  5. echo Squashing %1 commits...
  6. git reset --soft HEAD~%1
  7. git log --format=%%B%%n --reverse "HEAD@{1}" -n %1 > _msg.txt
  8. git commit -t _msg.txt
  9. del _msg.txt
  10. echo Done!
  11. goto end
  12.  
  13. :blank
  14. echo Missing parameter: number of commits to squash.
  15. exit /B 1
  16.  
  17. :end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement