zl程序教程

您现在的位置是:首页 >  工具

当前栏目

git clone

Git clone
2023-09-11 14:14:22 时间

$ git clone https://github.com/git/git.git git3

将代码clone到指定的文件夹中

 

自己指定remote的名称

$ git clone -o git  https://github.com/git/git.git git4

$ git remote -v
git https://github.com/git/git.git (fetch)
git https://github.com/git/git.git (push)

 

使用git clone --depth=1 之后,需要看完整的history

https://stackoverflow.com/questions/29270058/how-to-fetch-all-git-history-after-i-clone-the-repo-with-depth-1

Use git pull --unshallow and it will download the entire commit history.