DebianJoe / dungeons

Roguelike Project in Python w/ libtcod
13 stars 5 forks source link

To branch or not to branch? #13

Closed wesleywerner closed 11 years ago

wesleywerner commented 11 years ago

Purely git flow related:

Should I make a branch for each feature? I only ask as when I did my first readme update, I commited and did a pull request.

I then made a second feature addition, commited, and this time my pull request included said feature, and my first "readme" change.

So if I branch each feature, I only commit and request the code specific to that feature. This is right, yes? Or is there some other way (tm)?

Pardon my git naivity :monkey:

Frostlock commented 11 years ago

I don't know much about Git either but I think a branch is something you would only use for something very experimental, or something you want to work on for a longer time. Merging a branch back in after a long time of co-existence can get difficult I think.

wesleywerner commented 11 years ago

Not at all, git philosophy says, "commit early and often". Branching allows me to hack away, and later I can switch back to master to try out the new added features from upstream.

Also yesterday I added your fork as a remote @Frostlock, and I tested your inventory stacking, without affecting my changes or master directly.

I just found a nice page that told me to use branching whenever I can, I guess I just answered my own question.

http://www.git-tower.com/learn/version-control-best-practices.html

Frostlock commented 11 years ago

Interesting link! I stand corrected, guess we'll have to try it out. It will also depend on what DebianJoe prefers to receive as upstream input. We'll need to figure out the easiest workflow. :question:

DebianJoe commented 11 years ago

Branches are great, it's when they start to take off in separate directions that it gets odd. I managed to get Frostlock's changes added in by merging them and then knocking out the physical part of the merge easily. The hard part was editing the "why did you merge outside github" comment for the commit with vim. I use emacs and had to google vim hotkeys.

wesleywerner commented 11 years ago

I just realized that link is for a Mac site, whoops. Still interesting...

DebianJoe commented 11 years ago

I noticed that, but decided to leave the subject alone. No reason that just because someone owns a mac, they couldn't also be decent with version controlled software.

wesleywerner commented 11 years ago

Well, there is lots of information online on how to branch, but not so much as to the why. So I will leave the link unchanged,thanks for the replies. Answered.

Frostlock commented 11 years ago

Ya, and the platform does not matter, the ideas stay the same.