Updates to work flow descriptions for GIT

Gerald (Jerry) Carter jerry at samba.org
Thu Jul 5 17:59:29 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

James Peach wrote:

>>
>> how do you managed to only have the interesting branches instead of all?
> 
> git-svn init svn+ssh://svn.samba.org/data/svn/samba
> [edit .git/config]
> git-svn fetch
> 
> When you edit .git/config, make it look like this:
> 
> [svn-remote "svn"]
>         url = svn+ssh://svn.samba.org/data/svn/samba
>         fetch = branches/SAMBA_3_0:refs/remotes/samba3
>         fetch = branches/SAMBA_4_0:refs/remotes/samba4
>         fetch = branches/SAMBA_3_0_25:refs/remotes/samba3025
> 
> ie. remove the wildcards and add explicit mappings for the branches you
> care about. you can add new mappings later and 'git-svn fetch' will pick
> them up.

Actually I grabbed everything and then created local branches
that I push out. In my .git/config, I just added:

[remote "samba"]
        url = jerry at git.samba.org:/data/git/samba.git
        push = v3-0
        push = v3-0-23
        push = v3-0-24
        push = v3-0-25
        push = v3-0-26
        push = v4-0

where each local branch was created from remotes/SAMBA_X_X

>> do you use git-svn dcommit ? If so it would be 
>> interesting what the workflow is to commit from back to
>> svn from a local feature branch

ok. Obviously this is a bit different than people without
svn write access would work.  Normally the git-svn repo is
strictly a mirror and used to push changes to the master
repo on git.samba.org.

Initially I clone git://git.samba.org/samba/ like everyone else
and work exclusively from there. When something is ready to
be merged upstream, I simply

  $ git-pull --squash /path/to/local/tree <branch>
  $ git-svn dcommit

To merge to another branch (say merge a change to SAMBA_3_0_26
that I just checked into SAMBA_3_0), I use git-cherry-pick to
merge the single change.

And to send out patches to the mailing list, I do something like:

  $ git-format-patch --attach -1
  ....edit generated file
  ....add comments to msg body and extra To: and CC: lines
  $ git-send-email <generated patchfile>

PS: If you want the svn+ssh:// git mirror, you can grab it
from rsync://us2.samba.org/src/samba-svn.git.tgz (~170Mb)
Once you untar it, just run "git-svn fetch"  You also see
the local working branches for v3-0, et. al. which you can
remove and create you own.  The sha1 hashes should continue
to be the same between the master mirror and your local copy
due git generates the content hashes.

PSS: That tarball will be of no use to people without svn
write access.




cheers, jerry
=====================================================================
Samba                                    ------- http://www.samba.org
Centeris                         -----------  http://www.centeris.com
"What man is a man who does not make the world better?"      --Balian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGjTGBIR7qMdg1EfYRAqcZAKDofvXLJ5wI8FyPkWipOnow6YZuNQCgmoVp
p/mRHqfZYhb34jI9wtK15HI=
=A1h4
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list