我必须在“ git clone”之后运行“ git pull”吗?

Mih*_*hai 1 git

我看到一些人在奔跑:

git clone <url>
git pull
Run Code Online (Sandbox Code Playgroud)

我个人只git clone <url>为所有项目工作而奔波。

我在文档中读到以下内容:

   After the clone, a plain git fetch without arguments will update all the remote-tracking branches, and a git pull without arguments will in addition merge the remote master branch into the current master branch, if any (this is untrue when "--single-branch" is given; see below).
Run Code Online (Sandbox Code Playgroud)

但这并没有真正给我一个理由。

我的问题是:git pull当我第二次克隆该项目时,附加值是什么?我应该始终运行git pull为好后git clone <url>

谢谢

Dan*_*ann 5

答案是“取决于”。克隆存储库需要多长时间?您是否认为自克隆以来有人进行了其他提交?如果答案是“是”,则拉。

如果克隆花费了5秒钟,则不可能。如果花了30分钟,也许可以。

克隆后立即进行拉动没有什么害处