Re: Newbie in Git. How to get back from last pull?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Yankovsky,

Yankovsky writes:
> I have commited all my changes, and accidently typed git pull, then was
> paniced and aborted the operation. now all my changes in project disappear.
> but i have commit. how can i restore my project status using this commit?
> I hope you understand my rus english)

I don't understand exactly what you want to do, but here are the
basics- you can decide what you want to do.
1. Use `git reflog` to see a history of your operations.
2. If you want your working copy to switch to an existing commit, use
   `git checkout <SHA1 of commit>`.
3. If you want to irreversibly destroy everything and switch your
   working copy to a desired commit, use `git reset --hard <SHA1 of
   commit>`. Use with care!

Hope that helps.

-- Ram
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]