1

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).

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).

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?

Thanks!

f.

Abizern
  • 146,289
  • 39
  • 203
  • 257
filippo
  • 5,583
  • 13
  • 50
  • 72
  • What kind of operating system is everyone running? – Abe Voelker Jun 02 '11 at 16:16
  • hehe all of then :P we've got linux, windows and macs once in a while.. mostly windows though. why? – filippo Jun 02 '11 at 16:25
  • Well, if you had the ability to SSH into eachother's computers into a limited git shell, it would make it really easy to push/pull directly from eachother. But that scenario is very difficult to achieve with Windows, I believe. – Abe Voelker Jun 02 '11 at 16:28
  • That was actually the closest call I got. I tried to tunnel everything over internet and putty. But it took a whole lot of configuration in each client and was a bit flaky :( – filippo Jun 02 '11 at 16:34
  • Thanks for the better title Abizern! – filippo Jun 03 '11 at 08:16

3 Answers3

2

How about sending each other pathches?

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.

Abizern
  • 146,289
  • 39
  • 203
  • 257
  • hey! I don't actually have a huge repo. In fact I have many small repos specific to the story being developed.. well sort of that. it is definitely easier to manage this way and allows me to do what I said above. But as of right now I wish I could use bigger managing cells.. – filippo Jun 02 '11 at 16:21
  • As I comment about patches, I'm not very comfortable with then... also, how would they handle binary files? – filippo Jun 02 '11 at 16:31
  • That's why you use format-patch - it handles it all for you. It turns each commit into an individual patch and it references the commit that it is based off. can recreate the remote repository in your own repository that way. – Abizern Jun 02 '11 at 16:33
  • Hm. interesting... I'll check the out. Thanks! – filippo Jun 02 '11 at 16:44
  • Good stuff. the --binary is pretty close. I'm still doing some tests, but seems pretty cool – filippo Jun 03 '11 at 12:21
1

If you have some way of setting up a shared directory, even if it is on someone's computer, you can do a git init there and have everyone add that repo as the remote. It isn't as clean as having gitolite or something SSH'd, but should work just fine.

Abe Voelker
  • 30,124
  • 14
  • 81
  • 98
  • meh.. super annoying I know, but the answer is no. we are a mixed team of consultants. some of us are in the correct domain, some others are in the office but connected via VPN and some others aren't even in the same network :( – filippo Jun 02 '11 at 16:30
  • 3
    That's too bad; I feel for you. In your scenario it would probably just be easiest to pay for a GitHub account with private repos. – Abe Voelker Jun 02 '11 at 16:37
  • lol you wouldn't believe, but not even gitbut is an option. I tried it as well just to find that we have a super security-tight proxy, which took me a incredible amount of configuration to get around (very interesting though, how you can do it installing your own local proxy server for authentication...) well, long story short, I'd probably get executed if someone audits network security while I was doing that :( – filippo Jun 02 '11 at 16:49
1

The nice thing about distributed version control is you don't need just one server that everyone can reach all the time. You can have as many servers as you need. You can set up a server or shared directory inside the company firewall, for everyone who has access to use, and have your offsite people each set up their own local ssh or something you can push and pull from as necessary.

If you want to continue your mailing repos around in zip files, all you have to do is instead of replacing your main local repo, unzip it into a separate folder, then do a git pull from that folder into your main repo in order to merge it in. Not nearly as efficient bandwidth-wise as git format-patch, but a little more familiar in your particular workflow.

Karl Bielefeldt
  • 47,314
  • 10
  • 60
  • 94