## Description
Persisting latest branch. Re-opening the branch opens it in the latest
branch
Fixes https://github.com/appsmithorg/appsmith/issues/30321
## 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/11325191494>
> Commit: 570c6fba8b85f59c8577efda5863d19049b0ebe1
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11325191494&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Git`
> Spec:
> <hr>Mon, 14 Oct 2024 10:27:07 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**
- Enhanced Git branch management functionality in the ApplicationCard
component.
- New utility functions for storing and retrieving the latest Git
branch.
- Improved error handling and response management for Git operations.
- Added user-specific tracking for Git branches in the AppEditorEngine.
- Introduced a new feature flag for Git branch persistence.
- New Cypress test suite to verify Git branch persistence after
switching branches.
- Added methods for asserting branch visibility and URL consistency in
the GitSync class.
- **Bug Fixes**
- Refined error handling for various sagas, ensuring accurate error
dispatching and user feedback.
- **Documentation**
- Updated function signatures and error handling descriptions in the
initialization and Git synchronization processes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->