DIYEFI.org Forum
http://forum.diyefi.org/

TortiseGIT
http://forum.diyefi.org/viewtopic.php?f=45&t=1027
Page 1 of 1

Author:  jharvey [ Fri Jan 21, 2011 12:50 am ]
Post subject:  TortiseGIT

Figured I'd bring this up here. To me it seems like there are differences in how git works, and how tortisegit operate. These apparent differences seem to keep getting me buggered, so I figured I'd talk about it some here.

I'll first start with github, I believe I want to fork Puma, which was forked from DFH. This seems to be my first problem. I don't see Fork as an option, when I browse to Puma. However when I browse to say ECUManager, I see fork as an option. So I guess that's my first obstacle. I'm guessing I should create a branch or something, then pull from Puma. I'm not really sure what approach I should take.

Author:  Fred [ Fri Jan 21, 2011 5:31 am ]
Post subject:  Re: TortiseGIT

OK, I can help you! :-) Yay :-)

You're right, github doesn't allow you to own multiple forks of your own stuff. There are a few valid approaches. The first thing to note is that forking and being a fork of something else is a conceptual thing on github only. You don't need that connection to exist.

1) create a branch in your existing DFH repo and just checkout his branch when you want to work on his, and yours when you want to work on yours.
2) Like 1, but have that branch always checked out in a seperate git clone
3) Create a second username and fork it there and clone and keep it separate (this maintains the link on github, but as noted, we dont need it, and this is a pain in the arse)
4) Clone nitrousnrg's repo a fresh, create a new repo called Puma on your account with no contents. Edit the configuration file inside .git/ to point at your account with the r/w access git ssh url and push it back up.

In summary, I would definitely do 4, definitely not do 1 or 2 and probably not do 3.

I hope that helps. Keep the questions coming, a few of us know git pretty well, especially me :-)

Fred.

Author:  Fred [ Fri Jan 21, 2011 5:35 am ]
Post subject:  Re: TortiseGIT

1 and 2 require special configuration to push and pull the right code from the right repo, plus, because the designs really are forks, they will cease to share much in common, so those approaches do not really make sense.

That might be more clear.

Fred.

Author:  jharvey [ Fri Jan 21, 2011 10:47 am ]
Post subject:  Re: TortiseGIT

That covers one of my first stumbling blocks. I didn't know the possible approaches, let alone the strengths or weakness of each approach. It's one of those situations where If I knew the answer, I would know the question.

I don't like 1 or 2. In my prior testing, it appeared to me that I would run the risk of file corruption this way. Seems like un-revision / un-controlled files would exist in both directories when switching from branch to branch. I also don't like 3, I've already got enough user names and password to keep track of.

So I started with 4. I created a new repo on github, and I've got a local copy of puma. As for modifying that git file, I'm sure I can do it via text editor, or git command line. I would prefer doing it via squishy Tortise gui instead. Here's the setting dialog. I believe I should simply update that URL to git@github.com:jharvey/puma.git, then commit, and push. Does that sound correct?

Image

Author:  jharvey [ Fri Jan 21, 2011 11:03 am ]
Post subject:  Re: TortiseGIT

I'm pushing right now. We'll see what happens. I noticed this

Image

Seems I should clean that up some how. Any ideas how, I think TortiseGIT wants me to merge branches to make those go away. Why do those two specify remotes/? Seems that's because github has them listed like that or something, I don't quite understand.

Author:  Fred [ Fri Jan 21, 2011 1:13 pm ]
Post subject:  Re: TortiseGIT

You're making it so so so so hard on yourself!!!!!

Use the text editor approach, it will take 5 seconds and work perfectly.

Do a fresh clone of Marcos' one into a fresh directory.
Open the .git/config file and replace the public line with nitrousnrg to a private one with your account name in it.
Go onto github and create the puma account, leaving it empty.
Run git push origin master
Profit.

I can walk you through it from chat if you want. Tortoise is a buggy irritating program that has cost many devs many thousands of hours with fcuked SVN checkouts that were shared across platforms, I do not recommend using it, though the git version may be better. In any case, using it to do something this specialised and weird is probably not a plan.

Fred.

Author:  jharvey [ Fri Jan 21, 2011 2:20 pm ]
Post subject:  Re: TortiseGIT

I think I have it in good order, or at least good enough so that Marcos can pull from it. How would he go about doing a pull? I'm not sure what he's using for tools, perhaps he's got the command line option, or perhaps he's using TortiseGIT.

Author:  Fred [ Fri Jan 21, 2011 7:13 pm ]
Post subject:  Re: TortiseGIT

see the sticky thread in general freeems for how to on semantics of push/pull sharing. the actions are the same no matter the tool. eclipse, gitk, gitgui, tortoise, cli, etc. see irc for other comments.

Author:  jharvey [ Mon Feb 14, 2011 2:18 pm ]
Post subject:  Re: TortiseGIT

This is what I have now for my tortisegit settings
Image
The putty key is dealt with by putty/pageant (or ssh on your linux box), so it's blank here. Also beware the quotes. I had a problem that appeared to be a private key problem, but it turned out Tortise had put quotes around the URL line. So beware the quotes in .git/config

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/