libredwg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libredwg] hello + contributions


From: Thien-Thi Nguyen
Subject: Re: [libredwg] hello + contributions
Date: Fri, 19 Feb 2010 00:48:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)

In my Git research, i found this[0] very useful.
Here are the commands to try:

$ cd /tmp
$ git clone git://git.sv.gnu.org/libredwg.git
$ cd libredwg
$ git pull http://www.gnuvola.org/wip/libredwg.git ttn

Apparently, the changes are now on the master branch, which
you (or whoever has write privs) can then push to savannah.

$ git log --format=oneline --abbrev-commit --reverse -8
6080c1c changing my email address on file headers
c8ef4d3 fixing version detection for iterator methods
192f0cd [admin] Add HACKING; nfc.
55ceaed [build] Add autogen.sh; delete generated files.
0f5c720 Update ignorance; nfc.
c4fc388 [build] Remove spurious AC_SUBST.
043b543 Whitespace munging; nfc.
1289893 [build] Add ACLOCAL_AMFLAGS to top-level Makefile.

This works for trusted changes (this time), but a safer approach in
general is to set up an evaluation branch "maybe", like so:

$ cd /tmp
$ git clone git://git.sv.gnu.org/libredwg.git
$ cd libredwg
$ git remote add gnuvola -t ttn http://www.gnuvola.org/wip/libredwg.git
$ git fetch gnuvola
$ git checkout -b maybe gnuvola/ttn

This first creates a "remote", associating the name "gnuvola" to the
gnuvola.org repo, specifically branch "ttn".  The "fetch" command
actually does the download.  The "checkout" command creates a branch
named "maybe" that tracks the remote branch gnuvola/ttn, and also
switches to that branch.  Now you see:

$ git branch
  master
* maybe
$ git show-branch
! [master] fixing version detection for iterator methods
 * [maybe] [build] Add ACLOCAL_AMFLAGS to top-level Makefile.
--
 * [maybe] [build] Add ACLOCAL_AMFLAGS to top-level Makefile.
 * [maybe^] Whitespace munging; nfc.
 * [maybe~2] [build] Remove spurious AC_SUBST.
 * [maybe~3] Update ignorance; nfc.
 * [maybe~4] [build] Add autogen.sh; delete generated files.
 * [maybe~5] [admin] Add HACKING; nfc.
+* [master] fixing version detection for iterator methods

After evaluating the code, the last step is to merge the branch
"maybe" back into master.

$ git checkout master
$ git merge maybe
$ git show-branch
* [master] [build] Add ACLOCAL_AMFLAGS to top-level Makefile.
 ! [maybe] [build] Add ACLOCAL_AMFLAGS to top-level Makefile.
--
*+ [master] [build] Add ACLOCAL_AMFLAGS to top-level Makefile.
$ git branch -d maybe

Although this second approach is more complicated, the up-front effort
is probably worth it for cases where changes should be evaluated without
touching master (in the branch "maybe", here).  Now we can delete the
branch "maybe"...

$ git branch -d maybe
$ git branch -a
* master
  remotes/gnuvola/ttn
  remotes/origin/HEAD -> origin/master
  remotes/origin/master

and continue as before.  When gnuvola/ttn v2 is ready, i will signal
the list and you need only do "git fetch gnuvola && git checkout -b
maybe-v2 gnuvola/ttn".  At least, that's the theory!

thi


________________________________________________________________
[0] 
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#public-repositories




reply via email to

[Prev in Thread] Current Thread [Next in Thread]