git回购问题相关傀儡
问题描述:
我是git
世界新人,最近我开始部署木偶。我打算在git
版本控制中放置傀儡。我下面木偶的食谱,做以下git回购问题相关傀儡
[email protected]:/etc/puppet# git init
Initialized empty Git repository in /etc/puppet/.git/
[email protected]:/etc/puppet# git add manifests/ modules/
[email protected]:/etc/puppet# git commit -m "initial commit"
[master (root-commit) c7a24cf] initial commit
59 files changed, 1790 insertions(+), 0 deletions(-)
create mode 100644 manifests/site.pp
create mode 100644 manifests/utils.pp
当我运行以下命令,我得到这个错误。什么是命令要做?
[email protected]:/etc/puppet# git push -u origin master
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我该如何连接到git并在我的客户端或其他地方签出我的回购?
答
你必须告诉混帐其中远程仓库位于:
git remote add origin <url-of-remote>
编辑:origin
仅仅是你的主要远程的传统名字,很像master
是你的主分支。
答
如果你已经在/ etc/puppet文件夹中完成了一个git init,它已经是'origin'了,你不必推送。
我想你只是想将文件添加到主分支。你已经完成了你的提交。试试git log
'git remote -v'输出什么? – Agis
git remote -v'empty'输出 – Satish