Two users editing same files unable to push changes

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

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
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,129 views 4 2
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