Difference between different refspecs in a git-pull call

后端 未结 3 1072
后悔当初
后悔当初 2021-01-17 03:34

Whats the difference between using the following git commands

git pull origin master
git pull origin master:master

Some ob

3条回答
  •  孤城傲影
    2021-01-17 04:10

    The first one tells git to pull the branch master from the remote origin. It doesn't tell git where to merge the fetched commits into. It uses the specified merge key in the configuration.

    The second one tells git to pull the branch master from the remove origin and merge it into the local branch master. This overrides the merge key in the configuration.

提交回复
热议问题