Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Git Version | Version Git Git merge two branches with moved files
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Git Version | Version Git

Subjects Author Language Messages Last message
Git merge two branches with moved files
Williamhawk English 0 Williamhawk [Read]
13 December 2017 à 10:31

Williamhawk, Wednesday 13 December 2017 à 10:31 | Quote


Subscription date : 05 October 2017
Messages : 130
I have two branches in my project. Every branch contains Main.java in both.

I do some changes in Main.java in the first branch(add some method or whatever).
in the second branch, I move Main.java to another folder and do some another change inside a class(for example add some different method).
After that, I tried to merge first branch and a second branch. But git doesn't understand that it`s the same file and, as result, I have two files Main.java, but in different folders. One Main.java contains changes from the first branch and another Main.java contains changes from the second branch.

When I commit changes on a second branch (with a moved file to another folder), then git shows me that file Main.java with the old path will be removed and Main.java with the new path will be added. As I understand, its have to say something just like "modified", "moved"...

I just need, that file will be in folder from second branch and contains changes from both branches. Or, at least, git understand that it's same file and show me Conflict(content), not Conflict(modify/delete).

Have any ideas about this?

Thank You!!!

I didn't find the right solution from the Internet.

References
https://stackoverflow.com/questions/47790132/git-merge-two-branches-with-moved-files

Web Marketing Examples

Git Version | Version Git

Subjects Author Language Messages Last message
Git merge two branches with moved files
Williamhawk English 0 Williamhawk [Read]
13 December 2017 à 10:31

Post a message

Anti-spam filter 10 (*) times (*) 7 =
            
Did you know ? The Size tag can display your text in any size : [size=35][/size]


Glx-Dock / Cairo-Dock List of forums Git Version | Version Git Git merge two branches with moved files Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.