* git branches & merge
@ 2016-10-12 13:50 webmaster
2016-10-12 14:43 ` Anatoly Borodin
0 siblings, 1 reply; 3+ messages in thread
From: webmaster @ 2016-10-12 13:50 UTC (permalink / raw)
To: git
Hi.
I have created a release_x branch to work on a new release. The branch is based
on master.
Later I needed to create a hotfix_x branch to work on a hotfix. This branch is
also based on master.
In the hotfix_x branch I needed to correct an IP address to communicate with.
After doing so, I merged the hotfix_x branch with master again and made my
deployment.
Now in the release_x branche the IP address is still the old one.
I am afraid of committing and merging my release_x branch since I think that my
newly defined IP address (now on master) will be overridden when merging.
Am I right? If yes, what is the best way to solve this?
Thanks
-fuz
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git branches & merge
2016-10-12 13:50 git branches & merge webmaster
@ 2016-10-12 14:43 ` Anatoly Borodin
2016-10-13 15:49 ` Kevin Daudt
0 siblings, 1 reply; 3+ messages in thread
From: Anatoly Borodin @ 2016-10-12 14:43 UTC (permalink / raw)
To: webmaster; +Cc: git
Hi,
the IP will not be overwritten, you'll still have the new IP in
master. Nothing to worry about :)
--
Mit freundlichen Grüßen,
Anatoly Borodin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git branches & merge
2016-10-12 14:43 ` Anatoly Borodin
@ 2016-10-13 15:49 ` Kevin Daudt
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Daudt @ 2016-10-13 15:49 UTC (permalink / raw)
To: Anatoly Borodin; +Cc: webmaster, git
On Wed, Oct 12, 2016 at 04:43:07PM +0200, Anatoly Borodin wrote:
> Hi,
>
>
> the IP will not be overwritten, you'll still have the new IP in
> master. Nothing to worry about :)
>
>
To expand on that, git does a so called 3-way merge. This means git will
look for a common base commit, and compare changes from both sides to
see which side actually made a change.
In your case, the base and the release branch both should show the old
ip, and the master side would show the new IP. This tells git that
master has changed, and not the release branch, and takes the master
side of the change, resulting the new IP to show up.
Hope this helps, Kevin.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-13 15:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-12 13:50 git branches & merge webmaster
2016-10-12 14:43 ` Anatoly Borodin
2016-10-13 15:49 ` Kevin Daudt
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).