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

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

Rolf Marsh November 3, 2014

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

0 votes
Rolf Marsh November 4, 2014

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

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.
November 4, 2014

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.

0 votes
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.
November 4, 2014

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events