标签云

微信群

扫码加入我们

WeChat QR Code

Using git, is there a command which I can reset a file to a specific commit in the commit log?

I know git checkout file can let me reset the file to HEAD, but how to reset to a specific commit version?


See stackoverflow.com/questions/4114095/…

2018年07月17日08分23秒

the post does not solve my problem I think. I need to know how to reset a specific file to its specific version?

2018年07月17日08分23秒

Try this one so : stackoverflow.com/questions/215718/…

2018年07月17日08分23秒

Also, to avoid ambiguity between file names and ref names, you may need to git checkout commit -- file...

2018年07月18日08分23秒