How to correct Git Merge Error: Head of branch [master][9251ec61bee19d8e8f38049c8ae91af3abd38eaa] does not match last commit on version [6489606bb0ab06dfdc0bc45e465ba4a09cff0f6f]

How to correct Git Merge Error:
Head of branch [master][9251ec61bee19d8e8f38049c8ae91af3abd38eaa] does not match last commit on version [6489606bb0ab06dfdc0bc45e465ba4a09cff0f6f]

Hi Nathan,

 

Have you done any work via the git CLI on your Matillion instance? I.e. anything in git that was not done through Matillion's web user interface?

 

In my experience, that can often break things :-(

 

JB

 

So this happens when you do anything outside of the Matillion UI (including PRs on your remote, etc). Matillion maintains the git repo in a detached state all the time and remembers the last commit id you used on whichever branch. You can still checkout branches that have been modified and see those changes, but you cannot make an additional commit to it since the commit id does not match what Matillion remembers.

 

What we've decided to do is make our master branch merge only. We're still able to check out those changes and run them, but we don't edit master ever. We're able to branch from the master commit, make new changes, push to the remote and then review PRs. We're treating it as a feature not a bug that we can't accidentally bork our master changes that are deployed. You have to deal with issues when matillion tries to push/pull and complains about master branch having additional refs though.

 

You could try branching from the last commit done within Matillion and merging your updated changes there.

 

I have started having this issue and can confirm that all of our commits are occurring from with Matillion. I'm filing a case with support right now as it's happened about 6 times in the past 2 months or so.

Can any one from Matillion or existing user confirm if this error still exists ?

 

We are doing PRs outside Matillion and after merging them in Git we are using a C# API to Fetch and Switch new merged commit. We are not facing this error all the time but every few weeks we are getting this..

 

Head of branch [dev][xxxxxxxxxxxxxxxxxxxxxxxxxxx] does not match last commit on version [yyyyyyyyyyyyyy]?

 

Amy solution for this ?

 

 

Hello JB,

 

No I have not attempted to run any Git commands from the CLI. I was considering it as a last resort, but have not attempted it yet. I am trying to stay in the tool as much as possible. Thanks for the reply.

Hi @mukeshthakor

I am sorry to hear you have met a similar issue to this one, I would recommend raising a support ticket via support@matillion.com. our experts will be able to take a more in-depth look at that for you.

Kind regards, Joe