我是新手,我想从github克隆一个应用程序到heroku.我试过这个命令
heroku git:clone git@github.com:[Creator]/[APPname].git [HerokuappDirectory]
Run Code Online (Sandbox Code Playgroud)
但我明白了 Resource Not Found.
使用标准方式将 git 存储库从远程服务器克隆到本地计算机相当容易,但我需要将远程存储库克隆到另一个远程存储库,这可能吗?
PS我提出这个问题是因为我无法在GitHub上分叉我自己的项目来创建子项目,我只能分叉其他用户的项目。这是关于克隆以从父项目创建整个子项目,而不仅仅是子模块。
这是git clone的文档
https://git-scm.com/docs/git-clone
通常我们会像这样克隆一个回购
git clone x
Run Code Online (Sandbox Code Playgroud)
但是,我想在本地重命名存储库,所以它将类似于
git clone x as y
Run Code Online (Sandbox Code Playgroud)
看看文档,目前尚不清楚这是可能的还是犹太教的,是否有人知道如何做到这一点?
它看起来像这样:
git clone x y
Run Code Online (Sandbox Code Playgroud)
根据文件:
<repository>
The (possibly remote) repository to clone from. See the URLS section below for more information on specifying repositories.
<directory>
The name of a new directory to clone into. The "humanish" part of the source repository is used if no directory is explicitly given (repo for /path/to/repo.git and foo for host.xz:foo/.git). Cloning into an existing directory is only allowed if …Run Code Online (Sandbox Code Playgroud) 好的。苹果系统。
alias gcurl
alias gcurl='curl -s -H "Authorization: token IcIcv21a5b20681e7eb8fe7a86ced5f9dbhahaLOL" '
echo $IG_API_URL
https://someinstance-git.mycompany.com/api/v3
Run Code Online (Sandbox Code Playgroud)
运行以下命令以查看:用户有权访问的所有组织的列表。 注意: 对于新用户(在此处仅传递 $IG_API_URL 将为您提供可以使用的所有 REST 端点)。
gcurl ${IG_API/URL}/user/orgs
Run Code Online (Sandbox Code Playgroud)
运行上面的代码给了我一个很好的 JSON 对象输出,我投入其中jq并获取了信息,最后现在我有了相应的 git url,我可以用它来克隆一个 repo。
我创建了一个主回购文件:
git@someinstance-git.mycompany.com:someorg1:some-repo1.git
git@someinstance-git.mycompany.com:someorg1:some-repo2.git
git@someinstance-git.mycompany.com:someorg2:some-repo1.git
git@someinstance-git.mycompany.com:someorgN:some-repoM.git
...
....
some 1000+ such entries here in this file.
Run Code Online (Sandbox Code Playgroud)
我创建了一个小的 oneliner 脚本(逐行阅读 - 我知道它是连续的但是)并运行 git clone ,它工作正常。
我讨厌并试图找到更好的解决方案是:
1)它是按顺序进行的,而且速度很慢(即一件接一件)。
2)我想在最大时间下克隆所有存储库,它需要最大的存储库来克隆。即如果回购 A 需要 3 秒,B 需要 20 秒,C 需要 3 并且所有其他回购需要不到 10 秒,那么我想知道是否有办法在20 -30 秒内快速克隆所有回购(相对于 3+20+3 +...+...+... 秒>分钟,这会很多)。 …
我目前正在使用Git Bash克隆一个拥有超过100,000次提交的大型存储库.克隆过程已持续超过半小时,但仍未完成接收对象.
可以git clone从Git Bash 取消命令吗?
(作为参考,我在Windows 7 Professional上使用Git 2.17.0(64位)).
在新的存储库上,我经常发现自己对 master 分支进行了更改,当然我应该从开发分支开始。
当然,我应该在开始进行更改之前创建一个功能分支,在这种情况下,我会注意到我处于主控状态,而不是开发状态。
但是 git 中是否还有一个设置可以更改默认的克隆/签出分支来开发?
我在克隆 AWS CodeCommit 存储库时(错误地)输入了无效的代码提交凭证,现在 git clone https://git-codecommit.us-east... 给出 443 错误并且不提示输入用户名。
看起来提示在一次失败的尝试后已被禁用,请帮助我如何再次启用它。
我试过:
git clone https://usenmae@git-codecommit.........
Run Code Online (Sandbox Code Playgroud)
也一样,但即使这样也行不通
我使用以下命令设置了用户名:
git config --local user.name <myuser>
Run Code Online (Sandbox Code Playgroud)
但即使这样也行不通
我想编写一个多次克隆本地git repo的脚本,但也会将所有未提交的更改复制到克隆的repos.这可能吗?
看了一下git-clone,但没有看到这样的选择.
我有一个dockerfile.我必须使用https url从bitbucket克隆存储库,但我想如何传递密码以使克隆完成? 是的,我尝试了ssh.它工作,但我需要https克隆的一些shell脚本运行,以便它应自动接受密码.
这是我的docker命令克隆repo:
运行git clone https://username@bitbucket.org/abc/xyz.git
这是我在buildind docker文件中得到的错误:\
克隆到'newfolder'...致命:无法读取' https://username@bitbucket.org '的密码:没有这样的设备或地址
我的构建命令是:
sudo docker build --no-cache = true -t image:build.