Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

GIT Error

Rama Bharti May 10, 2015

Hi ,

 

I am getting error with git while pulling. Here are the steps I have followed.

  1. Pull latest code.
  2. Merge my changes and commit.
  3. Before I push, somebody made push in GIT.
  4. I am trying to push and it says you need to pull first with latest copy.
  5. I tried to pull and it gives error again.
  6. I reverted my commit.
  7. But I need to push reverse to GIT and it does not allow and get below error:-

     = [up to date]      post_patch2_merge -> post_patch2_merge

     ! [rejected]        Release2.2 -> Release2.2 (non-fast-forward)

    error: failed to push some refs to 'w028@git.com.au:/app/git-repos/salesforce/newco.git'

    hint: Updates were rejected because the tip of your current branch is behind

    hint: its remote counterpart. Integrate the remote changes (e.g.

    hint: 'git pull ...') before pushing again.

    hint: See the 'Note about fast-forwards' in 'git push --help' for details.

    Completed with errors, see above

  8. Trying to pull  and get below erro:-
  9. git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree fetch origin 

     

     

    git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree pull --no-commit origin Release2.2 

    You have not concluded your merge (MERGE_HEAD exists).

    Please, commit your changes before you can merge.

    Completed with errors, see above

Can you help please?

 

2 answers

1 accepted

0 votes
Answer accepted
sreekumar_menon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 10, 2015

I think the problem is your pull failed to merge automatically and went to conflict state. And the conflict wasn't resolved properly before the next pull.

1) Undo the merge and pull again.

To undo a merge:

git merge --abort 

2) Resolve the conflict.

3) Don't forget to add and commit the merge.

4) git pull now should work fine.

good luck!

 

Rama Bharti May 10, 2015

SreeKumar, 

 

Can you please confirm if I need to do below step by UI

 

image2015-5-11 12:44:21.png

 

Rama Bharti May 11, 2015

Thanks for your response. I am on Mac and not using command line. How I can do using UI.

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 11, 2015

You should only do that if you've resolved all conflicts.

sreekumar_menon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 11, 2015

Was this "resolved" ? You can resolve merge conflict in SourceTree UI too , using external tools .

0 votes
Tim Crall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 11, 2015

It looks like your actual question has been pretty well addressed, but your life will be easier if you and the other developers work on separate feature branches.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events