我的工作组有一个github存储库,它只是文档。
我克隆了该存储库,以使其在本地进行离线工作。
我不更改它或分支它。它会更新,但不会分支。
我要使用什么命令
如果要查找本地分支和远程分支之间是否存在差异,请运行diff命令
# display changes between local branch to remote
git diff master origin/master
要更新存储库中的所有内容,请使用fetch命令
# Fetch all changes from the remote
git fetch --all --prune
要将更改合并到您的分支中,请使用git pull
# merge the changes from the remote to my branch
# git pull is a combination of 2 commands. fetch + merge
# so this single command will fetch (bring) and add (merge) the changes
# made on the remote branch into your branch
git pull origin master
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句