## Description
On protected branches, we neither allow auto-commits nor expose the
results of the git status API. As a result, these two API calls are
redundant. Skipping them can reduce load times by approximately 30
seconds on protected branches.
Furthermore, since auto-commits are disabled for protected branches,
there's a high chance that the branch contains an outdated version of
the DSL. This often results in uncommitted changes in the file system
for those branches. Such uncommitted changes can slow down subsequent
checkouts to other branches, as Git needs to re-index these files before
performing a reset. These delays are even more pronounced when using an
EFS.
This PR removes the auto-commit and status API calls for protected
branches.
Fixes #`Issue Number`
_or_
Fixes `Issue URL`
> [!WARNING]
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._
## Automation
/ok-to-test tags="@tag.Git"
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/15459263185>
> Commit: 2b04a0edf89088795192d6fb1a068bf868ae924f
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=15459263185&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Git`
> Spec:
> <hr>Thu, 05 Jun 2025 07:51:10 UTC
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added the ability to explicitly reset Git status for artifacts,
providing clearer feedback when working with protected branches.
- **Bug Fixes**
- Improved handling of protected branches by preventing unnecessary
status checks and auto-commit operations, ensuring protected branches
are not modified unintentionally.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->