我有一个本地 git 项目,我想将其添加到 gitolite 中。显然这很难,所以我放弃了这个想法。我创建了一个新的 gitolite 存储库,将其添加到 gitolite-admin/conf/gitolite.conf 并提交并推送更改。然后我克隆了新的仓库git clone git-noah:project-name
成功地。然后,我将除 .git 之外的所有文件和文件夹复制到项目名称文件夹中。我做到了,
git add -A
git commit -a -m "Moved to new repo."
git push
我收到此错误:
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
fatal: The remote end hung up unexpectedly
error: failed to push some refs to 'git-noah:project-name'
远程(原始)存储库上尚不存在“main”。
git push origin main
第一次推送后,您可以使用更简单的
git push
Edit:随着最近的趋势,我的答案已经更新,用“main”替换“master”
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)