Working copy out of date; worried about doing a pull from remote

When trying to commit to Bitbucket, I'm getting this error:

Screen Shot 2014-11-03 at 12.40.11 PM.png

This is what the branch's look like:

Screen Shot 2014-11-03 at 12.43.39 PM.png

Why am I getting this error, and if I follow the suggestion and pull from the remote, what's going to happen to the changes in the local/working copy?  This makes me very nervous! laugh

 

2 answers

There is an option at the top of the log view to "Show Remote Branches". I would advise turning this ON so you can see what has been added to the remote 3.0.0 branch.

It sounds like there are new commits in Bitbucket's 3.0.0 branch. Assuming this is the issue, when you pull, Git/Hg will merge the remote 3.0.0 branch into your local 3.0.0 branch. If none of the changes in the remote overlap your local changes, you'll be good to push. If changes DO overlap, you'll be notified that there are conflicts, and you'll have to fix them manually, possibly by consulting with your teammates to make sure your merge doesn't break the work they've done.

Hi Seth.... this is what I'm getting now... both of these files are in .gitignore... is there a way I can force the pull?

Screen Shot 2014-11-04 at 7.37.09 AM.png

It's a bad use of .gitignore to ignore files that are tracked by the repository, because of this very situation. For a short-term fix, you'll have to un-ignore the files, then stash, then pull, then re-apply the stash. Once you have the current issue fix, take time to consider why the files are ignored. If they are files that are unique for most every instance of your application, they probably shouldn't be tracked by your repo at all. If they need to be tracked by your repo, you should change how you work with your local copy so that you don't need to ignore those files.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

251 views 3 7
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