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

How to resolve issue while attempting to pull

karson tse
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 23, 2019

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch origin

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks pull origin master
From https://bitbucket.astrazeneca.net/scm/bi/io-f1-model
* branch master -> FETCH_HEAD

fatal: refusing to merge unrelated histories
Completed with errors, see above.

1 answer

1 accepted

0 votes
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 23, 2019

Hi @karson tse 

Welcome to Atlassian Community.

By default, git merge command refuses to merge histories that do not share a common ancestor. You can override this by using the --force option, this bypasses the checks and may cause the remote repo to loose commits, so be careful when using it.

karson tse
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 23, 2019

Hi  Mikael,

Thank you for the response. I am very new to sourcetree/ git, I was wondering where do I find the force option when pulling?

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 23, 2019

Pull does not have a force option, only push. For pull you can use the option --allow-unrelated-histories, that will also disable the merge check similar to the --force on push.

Have you made any changes in your local repository? If so, have you pushed those changes up to Bitbucket? If you have not pushed/made any changes, what you could try is to do a rebase instead. there is a checkbox for it when you click on pull.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events