From: "Shawn O. Pearce" <spearce@spearce.org>
To: Blu Corater <blu@daga.cl>
Cc: git <git@vger.kernel.org>
Subject: Re: replacing a bad commit
Date: Mon, 5 Feb 2007 15:02:36 -0500 [thread overview]
Message-ID: <20070205200236.GB8623@spearce.org> (raw)
In-Reply-To: <20070205195332.GW14499@daga.cl>
Blu Corater <blu@daga.cl> wrote:
> I've got confused by the wording of the git-rebase man page. It says:
>
> <upstream>
> Upstream branch to compare against
Hmm. Yes, that manpage can be somewhat confusing.
> Which suggests to me that <upstream> must be a branch tip, and not a
> random commit, as seems to be the case (well, not random, but reachable
> from <branch> if I understand well). Also, the man page doesn't give any
> example of rebasing using a random commit as <upstream>, they all use
> branch tips which reinforced my wrong assumption.
The faster you abandon the idea of branch tip as argument, the
faster you will pickup the more advanced operations in Git.
Anytime we talk about a branch as input to a command, it can really
be any commit. And anytime we talk about a commit or an object,
it can be expressed by using any of the operators discussed in
git-rev-parse's man page, which would include using a branch name
or an abbreviated (or full) SHA-1.
There are a limited number of commands which expect a branch name
(and only a branch name), as they modify that branch to contain a
new value. Examples of these are relatively rare, but include:
git-branch: the first argument is the name of the branch to create.
git-checkout -b: again, the name of the branch to create.
git-fetch: it can be asked to update local tracking branches.
--
Shawn.
next prev parent reply other threads:[~2007-02-05 20:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-05 15:39 replacing a bad commit Blu Corater
2007-02-05 16:38 ` Jakub Narebski
2007-02-05 19:53 ` Blu Corater
2007-02-05 20:02 ` Shawn O. Pearce [this message]
2007-02-05 20:21 ` Blu Corater
2007-02-05 20:38 ` Jakub Narebski
2007-02-05 20:53 ` Blu Corater
2007-02-05 20:58 ` Shawn O. Pearce
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=20070205200236.GB8623@spearce.org \
--to=spearce@spearce.org \
--cc=blu@daga.cl \
--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 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.