Commit and Push Changes
After developing your app on a feature branch, to commit and push changes to your remote repository, follow the steps below:
- Click the + icon at the bottom left corner to commit the changes.
- In the deploy tab on the Modal, enter your commit message and click Commit and Push to update your repository with the latest changes.
When you push your feature branch to the remote repository, you can see the deployed version of the branch in Appsmith. To check the deployed app for your branch, click the Deploy button from the top right corner and in the deploy modal, click Latest Deploy Preview.
In case the remote counterpart of your current branch has some commits that aren't present on the local branch, the push command would fail, and you would need to pull the changes to proceed. After pulling the changes, push the changes again and all changes would be finally pushed to the repository, including the last commit.
Once the remote feature branch is updated in the repository, you can raise a PR to merge the changes with the master branch.
Renaming files: if you rename an entity (query, widgets etc), it's the same as deleting the old entity and creating a new one in the Git file system. For example, when you rename a query, you may see
2 queries modified while trying to commit; the 2 changes are the old query being deleted and the new one being created.
Appsmith updates: when an Appsmith version is updated, you may see uncommitted changes in your local Git branch even when you've made no changes in your app. This happens due to new feature additions to the platform. You can commit these changes as version update changes. To avoid conflicts due to Appsmith version updates, follow the steps below:
- Open your app in the master branch and commit the version update changes.
- After successfully committing and pushing your changes, switch to your local feature branch and merge the changes from the master branch into the feature branch.
While developing an application in Appsmith, sometimes, you may want to discard the current changes and revert to the previous stable version. To discard the changes, click Commit and Push icon and in the Deploy Modal, click the Discard Changes button. When this button is clicked, along with the current changes being discarded, the latest changes are pulled from the remote repository so that your application is in sync.
Discarding changes have the following impact on the entities (pages, queries, JSObjects etc.):
- Any entity (pages, queries, JSObjects etc.) added after the last commit is removed.
- Any resources that are deleted after the last commit is restored.
- Changes made to any resource after the last commit is removed.