Two users editing same files unable to push changes

Nicholas Maddren February 24, 2016

Hey guys, I am a little bit confused using Source Tree with BitBucket right now.

So we are using Gulp to mix all of our JS files and CSS files so whenever we make changes to our project our main.js file and main.css file's will always be mixed and need committing in Source Tree.

This is causing big issues for us with Source Tree because if I or my colleague edit the same files we are unable to merge or push to our live server because we get errors.

Here is a scenario that we have quite often:

I will be working on a file at the same time as my colleague, my colleague finishes his work with that file and commits it then merges his branch to the main branch and then push's it to the server.

Meanwhile I have been working on the same file on my own branch and commit my changes to my branch. I then notice that I have a pull notification for the main branch so I pull it, I then try to merge my branch to main branch however I get conflicts because the file that I have been working on has changed.

Any idea how we can solve this issue?

1 answer

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.
February 25, 2016

You could resolve the conflict by re-running Gulp so it generates new files (based on the merged separate JS and CSS files) that overwrites the conflicted main files.

After doing so, if SourceTree still says the file is conflicted, you can right-click it and "mark as resolved".

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events