Retrieve specific commit from a remote Git repository

后端 未结 10 1808
谎友^
谎友^ 2020-11-22 06:32

Is there any way to retrieve only one specific commit from a remote Git repo without cloning it on my PC? The structure of remote repo is absolutely same as that of mine and

10条回答
  •  滥情空心
    2020-11-22 06:49

    I did a pull on my git repo:

    git pull --rebase  
    

    Allowing git to pull in all the code for the branch and then I went to do a reset over to the commit that interested me.

    git reset --hard

    Hope this helps.

提交回复
热议问题