简体   繁体   中英

How to go back to previous commit?

I was doing some cleanup and accidentally deleted a folder.

then:

git commit -a -m  $VER
git push -f -u origin master

I'm trying to restore the folder but I don't see it in previous commits.

How to go back to previous commit?

Based on the tag google-cloud-source-repositories . You can see the history of your commits on your source repository page https://source.cloud.google.com/[YOUR REPO]

In the history tab you will see the changes made. You will need to go the previous commit of the deleted elements. Once you identify the commit, you can follow the answer in https://stackoverflow.com/a/4114122/6003934 . 删除的子文件夹

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM