Git undo last commit
I have a folder structure like this..
~/git ......all repos of my github account .....play .....emacs.d .....dummy .....etc
i have created dummy repo to get familiar with git commands.
so instead of initializing dummy folder,i have issued
git init in git folder and
git add . ,and committed to my local repo.
I want to go back to my previous state,and do not want to loose any changes i have done. How can i do that?
You don't want to loose all your previous history in that repository or changes from the last commit you accidentally commited into it? Or both?
it was not......
Then just delete the .git folder.