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 

Advertisements