简体   繁体   中英

git recover deleted remote branch

I was work on home PC and mistakenly removed branch before making merge with dev . Now I don't have access to my PC, but I really need those data.

git fsck --full --no-reflogs | grep commit

or

git reflog

does not help because commits were made on other PC. Name of deleted branch I forget =(

If you pushed before you deleted it, and didn't delete the branch you pushed on the remote you pushed to, it will still be there. git fetch / pull that remote to get your branch.

If you didn't push, sorry - the data never left your home PC. You'll have to either SSH into your home PC or wait until you get home to run git reflog .

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