logo

NJP

Video: ServiceNow Git integration - Revering commits

New article articles in ServiceNow Community · Apr 22, 2025 · article

https://www.youtube.com/watch?v=nAXsvVGXyEM&list=PL5DgOfLBA3RZ2BvcbNxdNtd3Y%5F1tW-hG9&index=3

Step-by-step instructions on reverting a commit and how to resync repo code back with ServiceNow.

In a repo clone, issue the following commands:

1. git log --reflog

2. git revert [the_commit_id_to_remove]

3. git add -u

4. git revert –continue (:wq!)

5. git push

Once the commit is reverted on the git repo and "Apply remote changes" is done from the instance. Both records will go back to a previous version before the changes were made

Each record has an associated history of versions in sys_update_version

Find the version that had the changes and in the Global scope use "revert to this version"

View original source

https://www.servicenow.com/community/developer-articles/video-servicenow-git-integration-revering-commits/ta-p/3244707