下面的git命令有什么不同?
git fetch origin和
git fetch --all从命令行运行它们看起来像是在做同样的事情。
发布于 2016-04-15 01:55:03
git fetch origin仅从origin获取数据,而git fetch --all从所有远程获取数据(origin是其中之一)
发布于 2016-04-15 02:12:43
git fetch --all
--all
获取所有遥控器。
如果您想要获取所有数据,同时还要删除
删除的数据添加--prune标志
# Fetch all data, remove dangling objects and pack you repository
git fetch --all --prune=now发布于 2016-04-15 01:54:48
您的存储库可能有一个别名为'origin‘的远程点,但您也可以配置其他远程点。后面的命令将从它们中获取所有内容。
更多信息请参见the docs for fetch。
https://stackoverflow.com/questions/36630490
复制相似问题