Though these two operations work similarly but there is a small difference, It's not safe to assume that these two would behave same. It can cause destructive results when using source control functionalities like Stash.

Publish(Studio) functionality saves the application and its changes to Git Repository, and deploy it to the local ServiceNow repository automatically at the same time when both are configured. But, "Publish to My Application Repository" function can publish the application to app repository only, It will not commit the changes to Git as it doesn't interact with Git.

As documented, Stash functionality or any other source control operations under "Source Control" menu depends on Git Repository only, they do not interact with app repository. So "Stash the local changes" function will reset the application to the latest version in Git repository.


Assume that we are developing an application called "TestStash" and we have used Publish functionality in Studio to save the application and its changes to Git upto its version 2.2.

Later we started using the publish functionality from system applications form[assuming both will work same] i.e., Publish to My Application repository to save later releases from 2.3 to 3.2.

Now, While working on developing application "TestStash 3.2", if we use "Stash Local Changes" functionality in source control, It will revert the application to the latest version in Git repository. i.e., reset to "TestStash 2.2" skipped intermediate versions saved only to App Repository.

Release or Environment


Additional Information

Advanced Studio and Scoped Scripting Best Practices

Article Information

Last Updated:2020-03-22 13:07:01