According to http://gitster.livejournal.com/42247.html , branches can be either:
I have topic branches x
, y
, and z
I have customers A
and B
which each want/paid-for a different set of features.
customer A
wants x
and y
. That's easy enough:
git checkout A
git merge x y
and voila. I have what I needed? But how do I automate/record which topics ought to merge into A. This is what I did: In my config file I have:
[branch "A"]
remote=.
merge=refs/heads/x
merge=refs/heads/y
and so now every time I want to update branch A, I simply:
git checkout A
git pull
and it automatically knows which branches to pull.
Is this a good idea and/or bad idea?
More specifically this is what I have in.git/config:
[branch "A.test"]
remote=.
merge=refs/heads/x
merge=refs/heads/y
So that branch A (which is the production branch) never accidentally pulls any changes.
You probably don't want to do that. Once x and y are merged into A, you'll have little else to merge from them in the future. Your work flow might need that though. Check out git-flow.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.