Last active
January 20, 2021 06:44
-
-
Save retanoj/e7018dd55776b71944b6b26abd041a8f to your computer and use it in GitHub Desktop.
Git拉取指定commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// git 拉取指定commit | |
// git 版本 2.27 | |
> git init | |
> git remote add origin {git_address} | |
> git -c protocol.version=2 fetch --depth=1 origin {commit_id} | |
> git reset --hard FETCH_HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment