GIT Squash [bash front]

#!/bin/bash ####################################### # AUTHOR: Shelby Copeland # # Purpose: People call it "squashing" # # it is just a rebase interactive # # used to help ease into git. # ####################################### num=`echo $1 | sed -r s/[^0-9]//g` if [ "$num" == "" ]; then echo Correct usage: squash #g echo --Where g is the number of commits you need to squash. exit 0 fi if [ "`echo $2 | sed -r s/d/D/g`" == "D" ]; then echo Debugging: echo -n " git rebase -i HEAD~$num" echo else git rebase -i HEAD~$num fi

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.