git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Peter Eriksen" <s022018@student.dtu.dk>
To: git@vger.kernel.org
Subject: Re: My first git success
Date: Fri, 13 Jan 2006 21:14:21 +0100	[thread overview]
Message-ID: <20060113201421.GA25252@ebar091.ebar.dtu.dk> (raw)
In-Reply-To: <86y81kvtvj.fsf@blue.stonehenge.com>

On Fri, Jan 13, 2006 at 10:57:04AM -0800, Randal L. Schwartz wrote:
> >>>>> "Linus" == Linus Torvalds <torvalds@osdl.org> writes:
> 
> Linus> I still hope the exchanges will result in more docs, or at least other 
> Linus> lurkers on the list also learning a new trick or two..
> 
> I've also enjoyed a bit of success putting a website under git.  I started
> working on AJAX-ing some of the code, but I needed to do maintainence on the
> live site, so I've just simply done "git-checkout master" to work on that, and
> "git-checkout ajax; git-pull . master" when I want to continue work on the
> ajax upgrades.
> 
> However, before I bug-fix, I have to "snapshot" any working changes in the
> ajax branch or I would lose them on "git-checkout master", which gives me
> commits that look like "snapshot".  Am I doing that wrong?  Is there a better
> way to do parallel development of a "live vs upgrade" branch, and make commits
> only when I make progress?

I've been wondering this myself.  Perhaps the following way would work?

    git checkout ajax          # Work on the ajax branch.
    git diff HEAD >ajaxdiff
    git checkout -f master     # Work on the bug fix in master.
    git commit -a -m "Bug fix in master"
    git checkout ajax
    git apply ajaxdiff
    git commit -a -m "Finished commit in ajax"

This is untested, so it's only for inspiration.

Regards,

Peter

  parent reply	other threads:[~2006-01-13 19:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-13 14:51 My first git success walt
2006-01-13 17:11 ` Linus Torvalds
2006-01-13 18:57   ` Randal L. Schwartz
2006-01-13 19:37     ` Junio C Hamano
2006-01-13 20:14     ` Peter Eriksen [this message]
2006-01-14 15:39   ` My first git success [not quite] walt
     [not found]     ` <20060114105504.157248db.seanlkml@sympatico.ca>
2006-01-14 15:55       ` sean
2006-01-14 17:18         ` walt
2006-01-14 17:48           ` Randal L. Schwartz
2006-01-14 20:31             ` Junio C Hamano
2006-01-14 19:25     ` Linus Torvalds
2006-01-14 20:41       ` walt
2006-01-14 20:49         ` Junio C Hamano
2006-01-14 21:57         ` Linus Torvalds
2006-01-15 10:44       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060113201421.GA25252@ebar091.ebar.dtu.dk \
    --to=s022018@student.dtu.dk \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).