TortiseGIT

A place to discuss software and code that isn't automotive related. Free and open source preferred but not compulsory.
Post Reply
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

TortiseGIT

Post by jharvey »

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.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: TortiseGIT

Post by Fred »

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.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: TortiseGIT

Post by Fred »

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.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: TortiseGIT

Post by jharvey »

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
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: TortiseGIT

Post by jharvey »

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.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: TortiseGIT

Post by Fred »

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.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: TortiseGIT

Post by jharvey »

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.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: TortiseGIT

Post by Fred »

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.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: TortiseGIT

Post by jharvey »

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
Post Reply