标签云

微信群

扫码加入我们

WeChat QR Code

Possible Duplicate:
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 issued 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?

2018年06月19日10分49秒

it was not......

2018年06月20日10分49秒

Then just delete the .git folder.

2018年06月20日10分49秒