S
S
Sergey2014-08-07 11:20:31
PHP
Sergey, 2014-08-07 11:20:31

Why can't merge branches in git?

In general, the project has 3 branches:
1. 85per1000
2. MailDiv
3. Master
My actions: 1. The
day before yesterday I committed and pushed MailDiv
2. I committed and pushed 85per1000 yesterday
3. Then I started making changes to MailDiv, committed them from myself (didn’t push), and urgently switched to the 85per1000 branch to finish it. Finished and pushed 85per1000
4. Then I just poked around in the system and introduced my debugging variables, and what if this or that, but how it will be here, i.e. wrote a lot of garbage that I want to clean up.
I want to fetch all branches except MailDiv from the server and merge them.
I did pull master and 85per1000. When I do git merge master and 85per1000 it says:

error: 'merge' is not possible because you have unmerged files.
hint: Check in the working branch
hint: then use 'git add/rm ' to
hint: commit changes and commit or
hint: use 'git commit -a'.

in git status i see files i don't want to commit, but when i git rm those files, it tells me
fatal: path pattern 'FILENAME' does not match any file

But the file along the way is exactly there and git status sees them.
Why is this happening and what should I do to get the result I need:
Have everything that is on the server, overwriting ALL my new changes that differ from the server, except for the Maildiv branch, I want to keep it as I have it. At the same time, I don’t want to push it yet, there’s shitty code.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artur Smirnov, 2014-08-07
@artursmirnov

I think it will help yougit reset --hard

N
nurise, 2014-08-07
@nurise

maybe something messed up when switching branches?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question