Re: Merge *to* branch instead of merge *from* branch?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 26, 2008 at 3:42 PM, Peter Karlsson <peter@xxxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux