Liya Li Liya Li - 1 year ago 56
Git Question

How to force sync git code to specific commit id with command line

I cloned a new repo on my machine with the command 'git clone https://xxx.git C:\git'
Then I want to by force change the code status to specific commit id for example 'fc46f1d', not the latest.
What command should I use?

Answer Source

If I understand your question correctly, you're looking for git checkout