Skip to content
Go back

Bash Script to Resolve Merge Conflicts

Updated:

A reoccuring problem I run into at work is handling multiple branches on a dev environment comprised of Java, JavaScript, SQL, and SCSS files.

It’s not an ideal scenario, but utilizing Jenkins, the task is fairly easy in the pipeline - you list the branches you want built, you tell it to deploy (or on a schedule) and it runs through and confirms there is no merge conflicts, before continuing on the pipeline to run the jasmine tests to verify everything is up to snuff on the front-end. Of course, since it’s Jenkins, I can kick off the build, then head to the console output and watch for an error, or wait for it to fail.

But who has time for that? In that time, three new JavaScript frameworks were released, and one failed, and the other already replaced Angular!

Also, as the code example lives in a gist - my entry may not always match the code (which will be the most up-to-date version).

What this script does:

What it still needs to do:

Note: This embedded Gist contains the most up-to-date version of the script, which may differ slightly from the explanation above.


Share this post on:

Previous Post
Getting a List of Images
Next Post
What is Testivus' wisdom concerning the proper percentage of test coverage?