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.

reset.sh


#!/bin/bash
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.

ci.sh


!/bin/bash
echo "Checking in..."

git add .

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

git push
echo "Done!"

%d bloggers like this: