Error with local stash and using Git
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2016 07:00 AM
Hi guys,
I have been having an issue which has already occurred three times, here is my issue:
I have connected my instance to a Git repository to allow team development. The connection works fine, and I have already made multiple pushes onto the repository. The problem came a couple of days ago. One of my co-workers had finished a part of the program, so they pushed their changes onto the Git repository without errors. When he notified me of this push, I pulled the changes he had made and began working from there. After making changes (i.e. creating tables / forms / columns...) I attempted to push my changes. Before pushing, I pulled from Git to make sure I had the latest version, but after the pulling was done, when I tried to apply my stashed changes and I received this message.
Trying to fix these conflicts, I hit the back button to find myself with this issue:
I don't know why, but it tells me that there are no conflicts, but it does not let me apply my stashed changes. If I hit either take stashed changes, or take remote changes, it does not do either. Instead, it just closes this popup and whatever work I finished would be locked up in a local stash that I could not access because this would occur when attempting to apply this local stash. This has happened to me three times already, even after resetting my instance. I later found out, by making small modifications at a time, that what was causing this issue was when I would modify a form from a table that was already created and present in the Git repository.
I do not know how to go about fixing this issue, and have not found anyone with a similar issue to help me out. If anyone has any suggestions, please feel free to comment, any help is appreciated.
Thanks,
Nicolas Olvirri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2016 08:03 AM
Hi Nicolas,
It's not possible to determine the cause of this issue without a deep investigation. Please open an Incident in Hi, so Support can can get the necessary access to your instance to troubleshoot.
Thanks
Cory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2017 07:32 PM
I had the same issue. Per HI Support:
Studio doesn't provide very much, if any, in the way of detail regarding the conflict. You can find information, however, in the sys_repo_stash table. Here's a link to the most recent record for the XXXX application: https://xxxxxx.service-now.com/nav_to.do?uri=sys_repo_stash.do
On the "Update Set Preview Problems" tab you'll see the following error: "Could not find a table field (x_nnnnn_xxx_xxxx.u_group) referenced in this update" To correct the issue, you can choose one of the Available Actions.
Using this view I was able to Skip the conflict then commit from there I then went back into the Studio, committed, and then did the re-apply of the stash, and everything was already committed, so I discarded the stashed update and then it applied the stash successfully. YMMV, but it worked for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2017 10:10 PM
Hi Nicolas,
Did you or coryseering end up finding a resolution for this issue? I found another post with the same issue but it is also unanswered (Stash lost on ServiceNow git branch ).
I am having the same issue, I can make a stash of just an application and module menu which will push without error to any instance. After committing those changes I made a table and form and saved another stash. Trying to apply this stash fails on all instances and comes up with conflicts and a list with no conflicts to resolve, even trying to apply it to the branch that I just created that stash on.
I did manage to get some things working using Toby's workaround above but it's obviously not ideal to have to do this all the time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2017 09:17 AM
Hi Nicolas,
I know this goes against what many people at ServiceNow believe about source control but...
I don't use stashes <shocked gasp goes here/>. The way my team and I do it is like this:
- We create three branches in our GIT repo "DEV", "TEST" and "MASTER".
- 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.
- In the Scoped App on our test instance, we pick "Apply Remote Changes".
- When testing has given us the green light, we go ahead and merge the TEST branch into the MASTER branch.
- On Prod, in the sciped app, we click the "Apply Remote Changes"
PLEASE NOTE: WE NEVER MAKE CHANGES TO THE TEST OR MASTER BRANCH DIRECTLY!!!
I gave a talk about this at Knowledge 17 called "Source Control and Client Separation". I've also written about this on my blog Integrating GIT for Source Control in ServiceNow — SNStud.io or you can message me directly!