Simple bash script to reset your git repository

1 Comment

Here’s a simple script I use whenever I screw up (often) and need to reset my git local git repository to a clean slate.

echo "Reseting git repository"
git reset --hard HEAD^
git clean -f
git merge origin/master 

Simple bash script for checking into git

Leave a comment

Having gotten tired of typing the same commands over and over again I created a simple script to conveniently check into my git repositories.

echo "Checking in..."

git add .

if [ -z "$1" ]
 git commit -a -m "cleanup"
 git commit -a -m "$1"

git push
echo "Done!"

%d bloggers like this: