假设我已经从 c:\执行了以下操作,从远程源获取最新代码的正确方法是什么?
# Create repo...
mkdir Test
cd Test
git init
...create files
git add .
git commit -a -m "Init Commit"
# Clone repo...
cd ..
git clone Test TestClone
# Edit original
cd Test
...edit files
git commit -a -m "Init Edit"
# Go back to Clone
cd ..\TestClone
# Get latest code
# Now what??? pull or update then pull
最佳答案
Git 会在您的克隆存储库中自动设置远程 origin
,并配置您的分支以在您 pull 时从它们在 origin
上的等价物 merge 。
在这种情况下,您所要做的就是 git pull
。
关于git - 在 Git 中执行 'remote update' 之前是否需要 'pull',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5833318/