heroku-like git安装程序? [英] heroku-like git setup?

查看:103
本文介绍了heroku-like git安装程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我如何得到它,所以我可以做一些像 git push production master 并且拥有远程仓库镜像我自己?



目前,每当我运行 git push production master 我得到:

lockquote

错误:默认情况下,更新非裸仓库中的当前分支



...



! [远程拒绝] master - > master(分支目前已检出)

我做错了什么?

解决方案

推送到工作存储库有点危险,因为任何正在进行的工作未被推送考虑在内,并且很容易丢失任何未提交的更改(基本上工作的HEAD可能与工作分支HEAD不一致)。完整的,血淋淋的细节在以下链接:



git push to a non-bare repository



建议您发布的仓库应该是裸露的仓库有一个检出树。使用git clone --bare选项创建裸回购。


I'm a noob when it comes to git.

How would I get it so I can do something like git push production master and have the remote repository mirror my own?

Currently, whenever I run git push production master I get:

error: By default, updating the current branch in a non-bare repository

...

! [remote rejected] master -> master (branch is currently checked out)

What am I doing wrong?

解决方案

Pushing to working repositories is a bit dangerous as any work in progress is not taken into account by the push, and it is quite easy to subsequently lose any uncommitted changes (basically the working HEAD can get out of step with the working branch HEAD). The full, gory details are in the following link:

git push to a non-bare repository

It is recommended that your published repository should be a bare repo which does not have a checked out tree. Bare repos are created using the "git clone --bare" option.

这篇关于heroku-like git安装程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆