Re: Noob question on using branches

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

 



Matthieu Moy wrote:
Barry Roberts <blr@xxxxxxxxxxx> writes:

I have a branch in my git repository that is a "released" branch.  It
only gets defect fixes as they are needed to patch our production
servers.

I want to get all those defect fixes back into the master, but I don't
want changes from the master getting into the production branch, so I
don't think I want to do:
git checkout master
git merge production

Why wouldn't you?

The "git merge production" will take all the changes in production and
put them in the current branch. You'll get a new revision that
contains both the stuff in master and the one in production. But
what's important is that the reference "master" is updated to that new
revision, but "production" stays where it is.
So it does.  That does appear to be exactly what I need.
Just try it, then run "gitk --all" to see if the result is what you
wanted. If not, "git reset --hard HEAD^" will move back "master" to
where it used to be (read about "git reset" before you run it).

--
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