From: Johan Herland <johan@herland.net>
To: SungHyun Nam <goweol@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git pull/merge master on other branch
Date: Fri, 09 May 2008 08:24:12 +0200 [thread overview]
Message-ID: <200805090824.12772.johan@herland.net> (raw)
In-Reply-To: <g00nb3$dlm$1@ger.gmane.org>
On Friday 09 May 2008, SungHyun Nam wrote:
> Hello,
>
> If I am on a branch (reguarly rebased), I don't want to switch to
> master branch, but merge origin into master.
> If I switch to master and pull and switch to branch, I have to
> rebuild almost of sources.
>
> How I can pull origin into master without switching to master
> branch?
You can't; merging requires use of the working tree (to resolve conflicts).
However, what you can do is make a local clone of your project (cheap,
because it just hardlinks files from the original repo), and checkout the
master branch in the clone, perform the merge (after having set up the same
origin and retrieved its contents), and then fetch (or push) the result back
into the original repo (remember: "fetch" instead of "pull", since the
latter will initiate a merge with your current branch).
Have fun! :)
...Johan
--
Johan Herland, <johan@herland.net>
www.herland.net
next prev parent reply other threads:[~2008-05-09 6:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-09 5:26 git pull/merge master on other branch SungHyun Nam
2008-05-09 6:24 ` Johan Herland [this message]
2008-05-09 8:28 ` SungHyun Nam
2008-05-09 9:06 ` Johan Herland
2008-05-09 17:16 ` Kevin Ballard
2008-05-13 2:22 ` SungHyun Nam
2008-05-13 16:08 ` Lars Hjemli
2008-05-13 17:24 ` Brandon Casey
2008-05-13 3:12 ` Kelvie Wong
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=200805090824.12772.johan@herland.net \
--to=johan@herland.net \
--cc=git@vger.kernel.org \
--cc=goweol@gmail.com \
/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).