git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kelvie Wong" <kelvie@ieee.org>
To: "Peter Karlsson" <peter@softwolves.pp.se>
Cc: git@vger.kernel.org
Subject: Re: Merge *to* branch instead of merge *from* branch?
Date: Sat, 26 Apr 2008 19:19:23 -0700	[thread overview]
Message-ID: <94ccbe710804261919u5aa5406cnd26f2eb4ff44990a@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0804270037220.1149@perkele.intern.softwolves.pp.se>

On Sat, Apr 26, 2008 at 3:42 PM, Peter Karlsson <peter@softwolves.pp.se> wrote:
> Hi!
>
>  My most common use-case of Git is currently somewhere along the lines of
>
>   git checkout master # start from here
>   git checkout -b new_branch
>   ...edit...
>   ...commit...
>   git merge master # to make sure I have the latest changes
>   ...make sure it all works...
>   git checkout master
>   git merge new_branch # fast-forwards master to new_branch's HEAD
>
>  Is there any way of not having to do the "git checkout master" first?
> Basically I want a flag to merge or checkout saying that I want to merge my
> branch into the branch I'm switching to. I can't seem to find any such flag.
>

I believe what you are looking for is in in the "push" command.

git push . new_branch:master # pushes your changes into master.

-- 
Kelvie Wong

      parent reply	other threads:[~2008-04-27  2:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-26 22:42 Merge *to* branch instead of merge *from* branch? Peter Karlsson
2008-04-26 23:17 ` Avery Pennarun
2008-04-27  2:19 ` Kelvie Wong [this message]

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=94ccbe710804261919u5aa5406cnd26f2eb4ff44990a@mail.gmail.com \
    --to=kelvie@ieee.org \
    --cc=git@vger.kernel.org \
    --cc=peter@softwolves.pp.se \
    /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).