the best guide for git

How to download the changes from dev-kelon/add_change   to local master branch.

mkdir  just_test
git clone  https://gitlab-master.xx.com/docs.git
cd docs/
git branch

    *master


git lfs pull origin dev-kelon/add_change
git pull origin dev-kelon/add_change

   ctrl-X, enter
git branch

From  https://www.yiibai.com/git/git_pull.html

 
 

git pull命令用于从另一个存储库或本地分支获取并集成(整合)。git pull命令的作用是:取回远程主机某个分支的更新,再与本地的指定分支合并,它的完整格式稍稍有点复杂。

使用语法

git pull [options] [<repository> [<refspec>…]]
Shell

描述

将远程存储库中的更改合并到当前分支中。在默认模式下,git pullgit fetch后跟git merge FETCH_HEAD的缩写。

更准确地说,git pull使用给定的参数运行git fetch,并调用git merge将检索到的分支头合并到当前分支中。 使用--rebase,它运行git rebase而不是git merge

示例

以下是一些示例 -

$ git pull <远程主机名> <远程分支名>:<本地分支名>
Shell

比如,要取回origin主机的next分支,与本地的master分支合并,需要写成下面这样 -

$ git pull origin next:master
Shell

如果远程分支(next)要与当前分支合并,则冒号后面的部分可以省略。上面命令可以简写为:

$ git pull origin next
Shell

上面命令表示,取回origin/next分支,再与当前分支合并。实质上,这等同于先做git fetch,再执行git merge

$ git fetch origin
$ git merge origin/next
//原文出自【易百教程】,商业转载请联系作者获得授权,非商业转载请保留原文链接:https://www.yiibai.com/git/git_pull.html

原文地址:https://www.cnblogs.com/morganh/p/14413209.html