merge conflics in a pull request

I have been working with a repository that has a master branch and other 3-4 features branches. So far I was having no problems even if I was pretty new to version control systems and bitbucket. 

Nevertheless, a few days ago, I push some code to one of the branches that had corrections from merge errors. I leave a directory that was not suppose to be there so I clean the previous commit with git reset HEAD~1 and push again the content without the other directory that I did not wanted. Once that was set, I created a pull request to merge the branch content into master but I got a couple merge errors in bitbucket. From what I read in this forum a valid process to solve this is to do: 

git checkout branch1
git merge master
*fix conflicts in the editor
git commit *m "message"
git push origin branch1

 The problem is that whenever I try to merge with master it says:  master - not something we can merge. I tried to do git merge origin/master and it says the same. I detected that maybe I do not have even a master since using git branch -a only shows a branch1 and an origin/branch1 as remote. I cannot checkout to master or origin/master and I have tried a lot of techniques in the internet. 

It would be very helpful if there is a simple way to fix this since I have been searching a lot of time without any luck. 

1 answer

0 vote

Do a fetch (all or just the branch) and make sure master is in your local

git fetch --all

Try the above steps after that and see if it can find master now.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,942 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you