Skip to content

Instantly share code, notes, and snippets.

@retanoj
Last active January 20, 2021 06:44
Show Gist options
  • Save retanoj/e7018dd55776b71944b6b26abd041a8f to your computer and use it in GitHub Desktop.
Save retanoj/e7018dd55776b71944b6b26abd041a8f to your computer and use it in GitHub Desktop.
Git拉取指定commit
// 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