git如何只拉取最新的代码?

阅读 15.1k
2 个回答

遇见问题,你可以先执行命令 --help

git clone --help

# 以下为截取输入,depth可以指定层数
--depth <depth>
           Create a shallow clone with a history truncated to the specified number of commits.
           Implies --single-branch unless --no-single-branch is given to fetch the histories near
           the tips of all branches. If you want to clone submodules shallowly, also pass
           --shallow-submodules.

例子:

git clone --depth=1 https://github.com/c-smile/sciter-sdk

或者你可以点击download下载zip包(只包含代码,不包含版本控制)

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进