undo git init code example
Example 1: remove git init
rm -rf .git
Example 2: git init at wrong folder
cd myFolder
rm -rf .git
Example 3: undo git
# KEEP CHANGES
git reset --soft HEAD~1
# REMOVE CHANGES
git reset --hard HEAD~1
rm -rf .git
cd myFolder
rm -rf .git
# KEEP CHANGES
git reset --soft HEAD~1
# REMOVE CHANGES
git reset --hard HEAD~1