All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: "Joachim Schmitz" <jojo@schmitz-digital.de>
Cc: git <git@vger.kernel.org>
Subject: Re: How to update a cloned git repository
Date: Tue, 11 Sep 2012 14:40:47 +0200	[thread overview]
Message-ID: <vpq4nn4d968.fsf@bauges.imag.fr> (raw)
In-Reply-To: <007001cd9016$8f980f80$aec82e80$@schmitz-digital.de> (Joachim Schmitz's message of "Tue, 11 Sep 2012 14:11:22 +0200")

[ Re-adding git@vger in Cc, I guess it was meant to be so ]

"Joachim Schmitz" <jojo@schmitz-digital.de> writes:

>> Then, work on the tip of the topic branch you depend on instead of pu.
>> These are more stable, as they will be rewritten only if this particular
>> topic branch changes.
>
> These are not available from git hub. Or are they? How?

I think they exist in some of the repos junio pushes to, but I don't
remember how/which one.

Anyway, you can easily get it from the commit that merges the branch
(it's the-merge-commit^1).

>> > Like this?
>> > git pull --rebase HEAD~42
>> 
>> That would be "git fetch" and then "git rebase", as I don't think "git
>> pull --rebase" would allow you to specify the starting point for rebase.
>
> OK, I'll try that next time then. Like this?
> 	git fetch;git rebase HEAD~42 --onto origin/pu

That should work, yes.

In general, when you have a somehow complex workflow, I recommand
fetch+(merge|rebase) over pull. It gives you more flexibility, and the
opportunity to check what you fetched before starting the merge.

>> > So far I create patches, wiped out the entire repository, cloned,
>> > forked and applied the changes, pretty painful.
>> 
>> This is conceptually similar to what "git rebase" does, but it does it
>> in a slightly more efficient way ;-).
>
> Indeed ;-)
>
>
>

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  parent reply	other threads:[~2012-09-11 12:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11 10:49 How to update a cloned git repository Joachim Schmitz
2012-09-11 11:06 ` Matthieu Moy
2012-09-11 11:17   ` Joachim Schmitz
2012-09-11 11:21     ` Matthieu Moy
     [not found]       ` <007001cd9016$8f980f80$aec82e80$@schmitz-digital.de>
2012-09-11 12:40         ` Matthieu Moy [this message]
2012-09-11 12:48           ` Joachim Schmitz
2012-09-11 13:07           ` Erik Faye-Lund
2012-09-11 16:05           ` Junio C Hamano
2012-09-11 16:21             ` Matthieu Moy
2012-09-11 16:46             ` Joachim Schmitz
2012-09-12  8:52               ` Matthieu Moy
2012-09-11 14:09     ` Sitaram Chamarty
2012-09-11 16:00     ` Junio C Hamano
2012-09-11 16:45       ` Joachim Schmitz

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=vpq4nn4d968.fsf@bauges.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=jojo@schmitz-digital.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.