Discussion:
setting up git repos and branches
Andy Dennie
2012-05-14 18:49:55 UTC
Permalink
Hi everyone,

I want to be able to occasionally submit fixes to Restlet, while maintaining local branches on my dev machine that (a) keep up-to-date with Restlet's branches, and (b) contain my fixes, including those that I have not yet submitted back to Restlet, and those I have submitted but which have not yet been accepted and merged (and maybe never will be, but nevertheless I need those changes for my own use).

I'm pretty new to git, and I'd like to get off on the right foot here.

Here's what I'm thinking, please advise on whether this makes sense or if there are preferable alternatives.

As an initial setup:

- clone "https://github.com/restlet/restlet-framework-java" to my local dev environment
- in my local repo, create branches off each of the Restlet-defined branches, e.g. branch "my-master" from "master", "my-2.2" from "2.2", etc.
- on github, fork restlet/restlet-framework-java to adennie/restlet-framework-java so that I have a place to push fixes, and from which I can send pull requests to restlet/restlet-framework-java.

When I want to work on a fix, I would (in my local dev environment):

- make sure "master" is up-to-date by pulling from origin/master
- merge "master" into "my-master"
create a topic branch off "master" (e.g. "issue-123")
- when ready, push my topic branch to my forked repo on github, and submit a pull request
- back in my local environment, merge my topic branch into "my-master", so that when building my dependent project against "my-master", I see all my fixes.
if applicable, backport my fixes to "my-2.2" or "my-2.1" branches by cherry-picking them from "my-master", so that I can build against a specific version of the library instead of "my-master" if I don't want to live on the bleeding edge.

Can you guys advise my on this approach? How do you do it?

Thanks in advance.
-Andy

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2960550
Loading...