This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
uncached=$(git diff --cached) | |
echo $uncached | |
if [ "$uncached" == "" ]; then | |
read -p "There is no cachediffrence, you probably already comitted. Do you want to DESTROY the last commit?? Type yes: " yes | |
if [ "$yes" == "yes" ]; then | |
git reset --hard HEAD~1 | |
fi | |
else | |
read -p "There is a cachediffrence, you probably added the files but didnt commit them. Do you want to DESTROY the uncommited files ?? Type yes: " yes |