unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Git workflow overview
@ 2008-03-27 21:29 Ludovic Courtès
  2008-03-28  4:36 ` Han-Wen Nienhuys
  2008-03-29  0:56 ` Neil Jerram
  0 siblings, 2 replies; 6+ messages in thread
From: Ludovic Courtès @ 2008-03-27 21:29 UTC (permalink / raw)
  To: guile-devel

Hi,

Just to clarify things, the following illustrates the typical Git
workflow.

First, we need to get a copy of the repository:

  $ git-clone ssh://SAVANNAH-ACCOUNT@git.sv.gnu.org/srv/git/guile.git
  $ cd guile

Then, imagine we want to fix something both in HEAD and 1.8.  We are
currently in `master' (the equivalent of HEAD), and it is the only
branch that we currently have:

  $ git-branch
  * master

Eventually, we'll want to do things in the `branch_release-1-8' branch
as well, so we need to create a local branch tracking the
`branch_release-1-8' branch at Savannah:

  $ git-branch --track branch_release-1-8 origin/branch_release-1-8
  Branch branch_release-1-8 set up to track remote branch refs/remotes/origin/branch_release-1-8.

We now have the two branches:

  $ git-branch 
    branch_release-1-8
  * master

We want to commit our fix to `master', then push it to the Savannah
repo's `master' branch (after making sure that we are up-to-date), then
to apply it to the 1.8 branch and push it:

    # hack the thing...
  $ git-commit -a -m "The fix."
  $ git-pull                # Check whether we're up-to-date.
  $ git-push
  $ git-checkout branch_release-1-8
  $ git-pull                # Update.
  $ git-cherry-pick master  # Apply the change we made in `master'.
    # fix any conflicts...
  $ git-push                # Push the change to `branch_release-1-8'.

That gives a rough overview of the thing.  For larger changes, it will
be better to use a separate branch locally, using `git-rebase' right
before merging it, etc.  There are surely good tutorials at
http://git.or.cz/ .

Enjoy!

Ludo'.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-03-29 17:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-27 21:29 Git workflow overview Ludovic Courtès
2008-03-28  4:36 ` Han-Wen Nienhuys
2008-03-28 16:38   ` Ludovic Courtès
2008-03-29  0:56 ` Neil Jerram
2008-03-29 11:31   ` Ludovic Courtès
2008-03-29 17:44     ` Neil Jerram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).