git branches (was: A question for you all: size_t or unsigned int)

martin f krafft madduck at debian.org
Thu Nov 13 13:57:21 UTC 2008


also sprach Paul Harris <paulharris at computer.org> [2008.11.13.1448 +0100]:
> Attached are 3 patches, you clone the git repo and then use "git
> am" to apply each one in turn (Martin already knows this,
> I didn't)

A better way to share those would probably be a branch you publish.
So you could e.g.

  git checkout -b paulharris/some-name

then apply/am/cherry-pick the commits that are part of "some-name"
(you might want to make more than one branch) into the branch and
push it (git push origin paulharris/some-name).

Then, people can just do

  git fetch origin
  git checkout -b paulharris/some-name origin/paulharris/some-name

to try it out.

If you have those three patches on top of origin/master right now,
so that your master is three commits ahead from origin/master, then
you could do this:

  git checkout -b paulharris/feature1 master
  git cherry-pick <commit belonging to feature1> <another commit>
  git checkout -b paulharris/feature2 master
  git cherry-pick <commit belonging to feature2>

and finally remove the commits from master:

  git checkout master
  git reset --hard origin/master

as before, BE CAREFUL with git reset --hard. If you are unsure,
always tag the current commit so that you can easily restore the
status quo. Or learn to read git reflog output.

-- 
 .''`.   martin f. krafft <madduck at debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
 
"arthur slapped his arms about himself to try and get his
 circulation a little more enthusiastic about its job."
                                 -- hitchhiker's guide to the galaxy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
Url : http://lists.alioth.debian.org/pipermail/libkdtree-devel/attachments/20081113/80193746/attachment.pgp 


More information about the libkdtree-devel mailing list