1
I have the arm develop in my local machine. In develop remote there are about 10 programmers pushing every day.
That’s why I always pull before merging my develop with the feature123 I’m working on and about to send to the remote feature123 arm.
Doing the remote develop pull I got the following message:
$ git pull origin develop
Enter passphrase for key '/c/Users/.../.ssh/id_rsa':
remote: Counting objects: 193, done.
remote: Compressing objects: 100% (193/193), done.
remote: Total 193 (delta 149), reused 0 (delta 0)
Receiving objects: 100% (193/193), 30.63 KiB | 0 bytes/s, done.
Resolving deltas: 100% (149/149), completed with 48 local objects.
From bitbucket.org:.../....-source
* branch develop -> FETCH_HEAD
21......64........c8 develop -> origin/develop
Auto-merging postback.php
CONFLICT (content): Merge conflict in postback.php
Auto-merging includes/db_manager.php
Auto-merging checkout-site.php
Automatic merge failed; fix conflicts and then commit the result.
That says that there were some automatic merges and one that could not be done automatically in the case in the postback.php file.
Then I asked for a status:
$ git status
On branch develop
Your branch and 'origin/develop' have diverged,
and have 131 and 74 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
You have unmerged paths.
(fix conflicts and run "git commit")
(use "git merge --abort" to abort the merge)
Changes to be committed:
...
modified: admin/details.php
...
both modified: postback.php
The fact is that what I have in my develop is exactly what I had since the last pull ( that was last night ). I didn’t work on the develop.
The first thing I don’t understand is why it wasn’t possible to merge automatically, since it was done in the other files and in none of them there was a change in the branch in question - in case develop.
The second thing I don’t understand is why it was considered Both modified: postback.php modified on both sides if I didn’t work with him on the local develop. I have another arm called feature123 and on this arm I modified the postback.php file. But it wasn’t in develop.
Can anyone explain why git showed this message?
You’re not in the branch
feature123
and trying to dopull
ofdevelop
?– Jéf Bueno
no, I’m in the develop branch
– zwitterion
And the file
postback.php
that you modified was committed? Note that I did not say sent to the server, I want to know if it was committed locally.– Jéf Bueno
This happened a few times, I could not figure out the reason to solve in a 'correct' way, but as I always leave synchronized, I decided to delete the (os) local file(s) that appeared(m) as modified(s) (even without modifying), pull, then commit, and then push would work again, but turn and move it happens, and sometimes it doesn’t work, in these cases I need to clone again, will be very useful an answer, because this must be problem by misuse.
– AnthraxisBR
LINQ, postback.php has been modified and committed in my feature123 branch. I’m now in the develop branch. No reason to have modification or commit here.
– zwitterion
@Anthraxisbr is.. I have to understand where this misuse is coming from.. Whether on my part, or the software I’m using or some other bug somewhere else.
– zwitterion