使存储库保持同步,而无法推送和拉出提交 [英] Keeping repositories in sync without being able to push and pull commits

查看:71
本文介绍了使存储库保持同步,而无法推送和拉出提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

截至目前,我无法使用git服务器,因此我使用了我最喜欢的git功能之一,该功能会将计算机中的任何目录都转换为git repo(只是git init东西).

As of right now, I cant use an git server, so I use one of my favourite git features which is turning any directory in my computer into a git repo ( just the git init thing).

我这样做是因为我是唯一的一种编码,而且我可以跟踪自己的东西.现在情况有所改变,我正在与一个小型团队合作.但是其他一些东西并没有改变,我仍然不能拥有git服务器,因此本地存储库仍然是唯一的选择.

I use to do this because I was the only one coding and I could keep track of my own stuff. Now things have changed a bit and I'm working with a small team. Some other things however did not change and I still cannot have a git server therefore the local repos are still the only option.

最直接的过程是在压缩我的存储库并将其发送过来时,将代码分发给其他人.完成后,他们将其发回给我,我将替换原始回购.效果不错,因为由于项目的组织方式,我们几乎从来没有两个人在同一个仓库中工作.

The most straight forward procedure has been to distribute the code to the other guys as zipping my repo and sending it over. When they are done, they send it back to me and I substitute the original repo. Works kind of fine since we almost never have two people working in the same repo due how the projects are organized.

现在,我希望我可以做一些更一致的事情.例如,将他们发送给我的所有东西合并到我的本地仓库中.这个例子将使我最终有两个人在同一个仓库中(或者可能是它的子集)工作.

Now, I wish I could do something more consistent.. like, merging whatever they send me into my local repo. This example would allow me to eventually have two people working in the same repo (or maybe subsets of it).

我一直在阅读有关git补丁脚本的信息.但老实说,我对解决方案并不满意.首先,因为在我最初的实验中它并没有立即起作用(是的,我知道只是更好地理解它的问题,但仍然不如git的其余部分直观),其次,因为我的存储库还将包含二进制文件,也需要控制..不确定补丁是否可以处理:/

I have been reading about the git patch scripts. But to be honest I didn't feel very comfortable with the solution. First, because in my initial experiments it didnt work straight away (yeah, I know is just a matter of understanding it better, but still, not as intuitive as the rest of git) and second because my repos will also contain binary files which I need to be controlled as well.. not sure if the patches can handle that :/

你们建议采用哪种程序进行组织? 有没有可以让我按照我描述的方式合并到存储库的命令?

Which procedure would you guys suggest to organize this? is there a command which would allow me to merge to repos in the way I describe?

谢谢!

f.

推荐答案

如何互相发送路径?

git format-patch git am 可能适合您的需求.我过去曾经使用过它,并且它可以很好地发送不频繁的更改.

git format-patch and git am might suit your needs. I've used it in the past and it works well enough for sending infrequent changes.

这篇关于使存储库保持同步,而无法推送和拉出提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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