Service Portal, Git, checksum.txt

josephdt12
Giga Contributor

When trying to merge two branches, the only conflict that comes up is the "checksum.txt" file.

Do we need to set up our instances so that the checksums match? Can I choose one of the conflicting checksums arbitrarily?

Unsure how to proceed with these kinds of conflicts beyond checking out one of the branches and applying the updates again.

6 REPLIES 6

User195062
Tera Contributor

I would also like to know the answer to this question.


treynohren
Kilo Explorer

Having a similar issue


Mark Scott1
Giga Expert

It is my understanding that the CheckSum.txt is a hash of the contents of the GIT check in. This means that something was changed in one branch and committed and the other branch never got the changes or the changes are out of date. Once you get this conflict, a merge is obviously not going to fix it.



This the way we've been dealing with changes in our Instance (this goes against what most people at ServiceNow will tell you so use at your own risk):



  1. We create three branches in our GIT repo "DEV", "TEST" and "MASTER".
  2. When we are happy with our changes we commit to DEV. When we are ready for testing, we use a third party tool called "SourceTree" (really any GIT tool that supports merging will work) to MERGE the DEV branch to the TEST branch.
  3. In the Scoped App on our test instance, we pick "Apply Remote Changes".
  4. When testing has given us the green light, we go ahead and merge the TEST branch into the MASTER branch.
  5. On Prod, in the scoped app, we click the "Apply Remote Changes"


PLEASE NOTE: WE NEVER MAKE CHANGES TO THE TEST OR MASTER BRANCH DIRECTLY!!! WE ONLY MAKE CHANGES IN DEV!!!



I gave a talk about this at Knowledge 17 called "Source Control and Client Separation" if you need my slide deck, let me know. I'm also going to write a blog post about this on my blog http://snstud.io or you can message me directly!


jayw
ServiceNow Employee
ServiceNow Employee

I would definitely be interested in the slide deck. My team is looking into moving toward implementing the git and grunt niceties that I have been able to use at other non-servicenow positions and someone has recently mentioned that the checksum will prevent us from being able to work with local branches. Seems like it should be something that can be overcome but I'm only just learning about the limitations so I don't know the whole story yet.