如何与远程Github存储库比较和更新本地存储库?

时间:2018-11-05 22:35:59

标签: git github git-diff

我想知道是否有任何API或技巧来确定我的程序(基于Visual Basic)是否不同于存储库master分支上的程序。

如果不是,我该如何在master分支中从新的矿井更新我的矿井?

2 个答案:

答案 0 :(得分:1)

如果不确定本地项目是否已更新,请使用以下命令:

git pull origin master

要查看本地项目和远程项目之间的差异,请使用以下方法:

git diff <local branch> <remote>/<remote branch>

您可以找到更多enter image description here

答案 1 :(得分:0)

git diff is the git tool to let you see changes between commits, branches, and the like. git pull is the git tool to fetch a repository and merge the latest changes.

These tools should have manpages under git-diff(1) and git-pull(1) respectively.