推到git裸回购,我不能从其他机器的变化 [英] Pushed to git bare repo and I can't pull changes from other machines

查看:113
本文介绍了推到git裸回购,我不能从其他机器的变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的Dropbox上有一个git repo,



我使用Ubuntu,



项目,我克隆了通过

  git clone blablabla / Dropbox / blablabla.git 

并且我推了500倍,但是现在我可以从另一台机器上拉出来,就像第一个400

也是我的blablabla / Dropbox / blablabla.git文件比我的本地小

  / var / www / blablabla / .git 

所以我猜想某些文件并未被推送,所以当我克隆

  blablabla / Dropbox / blablabla.git 

来自另一台机器



所以我该如何正确推入第一台机器,以便从第二台机器中拔出



我也有分支机构



加上 git push dropbox shows 最新



帮助?



我想我可以把这个

  /var/www/blablabla/.git 

在Dropbox上,然后克隆它,但是我在第一台机器上做了什么错误,再加上我希望能够正常推送,所以它会进行更改,这在一段时间之前有效(我有一些更改,但最后失去了100次提交)

解决方案

my blablabla / Dropbox / blablabla.git file小于我的本地 /var/www/blablabla/.git


当然:第一个是裸回购(因为你想推到)。

第二个是非裸回购,上面有一个工作树。它可以包含更多未包装的元素



使用Git使用Dropbox是很危险的:



是的,您无法推送到一个包,但您可以快速创建一个增量包来交换最新的提交(我提到脚本)。



关于缺少提交,和 git push dropbox 显示最新,检查你目前是否在一个有效的分支上( git branch ),而不是在分开的头部中。


I have a git repo on my Dropbox,

I am using Ubuntu,

I have a project which I've cloned via

git clone blablabla/Dropbox/blablabla.git

and I've pushed for like 500 times to that but all I can pull now from another machine is like first 400

also my blablabla/Dropbox/blablabla.git file is smaller than my local

/var/www/blablabla/.git

so I guess some files aren pushed and so it seems when I've cloned

blablabla/Dropbox/blablabla.git

from another machine

so how can I properly push now on the first machine so I can pull from the second

I also have branches

plus git push dropbox shows Up to date

Help?

I think I can put that

/var/www/blablabla/.git

on dropbox and clone that but what have I did wrong on the first machine plus I want to be able to normally push so it makes changes, this worked some time before (I have some changes but last 100 commits lost)

解决方案

my blablabla/Dropbox/blablabla.git file is smaller than my local /var/www/blablabla/.git

Of course: the first one is a bare repo (for you want to push to it).
The second one is a non-bare repo, with a working tree above it. It can include more unpacked elements in it.

Using Git with Dropbox is dangerous:

Yes, you cannot push to a bundle, but you can quickly create an incremental bundle to exchange the latest commits (I mention scripts in this answer).

Regarding missing commits, and git push dropbox showing "up to date", check that you are currently on a valid branch (git branch), and not in a detached head.

这篇关于推到git裸回购,我不能从其他机器的变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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