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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to create a pull request for a new project which has already been committed to master?

I have written a brand-new script that requires a code review.  Both the script and git repository are completely from scratch.  I am now at the point where I want my colleagues to be able to review my code.  Unfortunately, I would like to use bitbucket pull requests for the review, and it seems bitbucket is only designed to support development in branches.  Since this is a completely new thing in a brand new repository, I have been committing to master all along.  

I tried to fix this by creating a branch, making a minor change, and doing a pull request.  Only the tiny portion of the single file I changed after making the branch showed up in the Diff.  I want all my code there to review.

Next, I tried deleting everything in master, committing, and pushing to bitbucket (with everything still remaining in my branch).  Didn't work.  Bitbucket only showed the single file I edited after making the branch.  Also it showed a merge conflict in that same file on the pull request.  

I thought if I made a small edit to all files in the code_review branch, I could force them to show up.  Nope.  Only the tiny portion I edited for each file showed up in the Diff.  Also another merge conflict appeared, this time for each file I had edited.  



Given this situation, how can I do a pull request with a diff showing ALL of my code?  I'm so frustrated I'm ready to delete the entire repo, create a new one from scratch, copy over and commit my code to the branch only, and see if that works.  I know bitbucket is not intended for this, I'll do it the right way in the future.  I just want a solution for now.  

Why does git keep giving me merge conflicts?  I changed the code; I want those files deleted.  What conflict is there?  I am the only person making changes to this repo.  

Finally, what is the correct way to do a pull request in bitbucket for a completely new feature?  Should I have created a branch immediately, committed all my work to that branch and the pulled into master when I finished?  

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,922 views 0 7
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you