mac-git-将云端文件pull到本地

Posted jpr-ok

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mac-git-将云端文件pull到本地相关的知识,希望对你有一定的参考价值。

云端新增加了一个文件,本地只有一个2.text

技术图片

 

 将云端pull到本地:

(base) localhost:Merge_Conflict ligaijiang$ git log  #查看git日志
commit f169235a4423fe33c690949937136bc2b0abf26b (HEAD -> master, origin/master)
Merge: 5776619 715f7a5
Author: jiangpr_ok@163.com <jiangpr_ok@163.com>
Date:   Sat Mar 7 18:34:01 2020 +0800

    merge branch test

commit 715f7a5e02d25b0bb69715f5cf1278f30bd2c84b (test)
Author: jiangpr_ok@163.com <jiangpr_ok@163.com>
Date:   Sat Mar 7 18:10:14 2020 +0800

    5.02/3 update 5.04

commit 5776619c2f4b78f77d9db6f2ea630998e7b4ef9d
Author: jiangpr_ok@163.com <jiangpr_ok@163.com>
Date:   Sat Mar 7 18:02:28 2020 +0800

    5.02 update 5.03

commit f00ad2c7897bee301cb628c6eeb444db0f43f70b
Author: jiangpr_ok@163.com <jiangpr_ok@163.com>
Date:   Sat Mar 7 17:59:19 2020 +0800

    5.01 update 5.02 and update666666

commit 46198d2a72c9f8cac96994786314ed249513c5e2
Author: jiangpr_ok@163.com <jiangpr_ok@163.com>
Date:   Sat Mar 7 17:56:16 2020 +0800

    version 5.01

commit 86973723126774b106ee4fd2cd135f80642dd49a
Author: jiangpr_ok@163.com <jiangpr_ok@163.com>
Date:   Sat Mar 7 17:54:38 2020 +0800

    version2
(base) localhost:Merge_Conflict ligaijiang$ git pull origin master  #将云端pull到本地
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From https://github.com/gaigai-ok/git_intro
 * branch            master     -> FETCH_HEAD
   f169235..7ba19f9  master     -> origin/master
Updating f169235..7ba19f9
Fast-forward
 hello_everyone.txt | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 hello_everyone.txt
(base) localhost:Merge_Conflict ligaijiang$ ls  #可以查看本地也有两个文件了
2.text            hello_everyone.txt
(base) localhost:Merge_Conflict ligaijiang$ cat hello_everyone.txt #查看文件的内容
This is a greeting message. 
Hello everyone~
(base) localhost:Merge_Conflict ligaijiang$ 

 

以上是关于mac-git-将云端文件pull到本地的主要内容,如果未能解决你的问题,请参考以下文章

mac-git-将大神们的代码fork过来研究

Eclipse And Spring Tool Site git操作 拉取代码和推送代码

如何强制“git pull”覆盖本地文件?

解决因为本地代码和远程代码冲突,导致git pull无法拉取远程代码的问题

解决因为本地代码和远程代码冲突,导致git pull无法拉取远程代码的问题

从git pull和git fetch到txt文件中回显git消息/输出