www-infrastructure-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Current use of GitHub
Date Sun, 03 Apr 2011 13:01:22 GMT


I blogged a little about my use of git-svn a couple years ago:

http://www.dankulp.com/blog/?p=117

It's been 2 years, but I think it still applies.

But onto your questions.....

On Sunday 03 April 2011 2:45:10 AM Gav... wrote:
> I'm trying to understand the _current_ workflows of those ASF committers
> using Git and how the ASF GitHub mirrors tie into that - if at all.
> 
> A fair few projects requested ASF git mirrors and also requested mirrors of
> that on GitHub (that 2nd request is now standard with the 1st)
> 
> So far , from projects I've browsed on GitHub, I see a few forks here and
> there and a few Pull requests here and there.
> That is where it gets fuzzy for me. Obviously, no-one can actually pull in
> those pull requests into the Apache/$project repo mirror, so
> how are committers applying those pull requests? Are they pulling them into
> their own copies of the mirror, converting them into a patch
> that svn understands and then applying, if so, how? If not, how else?

I have a "clone" of the Apache mirror and do "git pulls" from there and 
generally my development branches and such track the "trunk" branch from 
there.   Thus, "git svn dcommit" commmits any changes on those branches back 
to Apache SVN.

For stuff coming from other git repos (like GitHub), you can add the other 
repo as a remote (git remote add ....) and then create local branches that 
track those branches as well.   In general, I would create a local branch that 
tracks the remote branch, do a review, maybe offer suggestions via email on 
dev list, do additional pulls to pull in the suggested changes, etc...   When 
ready, I'll create a new branch that tracks the ASF trunk and merge the other 
branch onto it.   Usually, I'll use --squash to squash it down to a single 
commit so it would act like a single "patch" instead of a bunch of individual 
commits, but that's kind of optional.


> Also, apart from Github, how else are Git only users providing patches to
> projects, which patch programs are in use, and of those which
> are most used by those projects/committers that need to apply them.

You can just use "git diff" to produce a patch just like svn diff and attach 
it to a JIRA.   The main difference is that there is an extra directory so 
when you apply, you need "patch -p1" instead of -p0.  Not a big deal really.


> For those of you that are committers and have direct access to svn, but are
> preferring to use Git before then committing your work to svn,
> what is your workflow and tools used (whether or not it involves GitHub)

Pretty much "git pull" periodically to pull changes from the ASF mirrors.    
"git branch fooFeature origin/trunk" to create a branch to work on and "git 
checkout fooFeature" to start working on the branch.   "git commit" to commit 
changes and "git svn dcommit" to push them back to svn trunk.

Dan 


> 
> No deviating into what could happen or what would be a good idea please
> yet, this is just a survey on what people are currently actually
> doing to incorporate Git into their workflows and how we then get those
> applied.
> 
> Thanks
> 
> Gav...

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

Mime
View raw message