Sync Main Branch
When the user wants to sync their main branch with the remote:
- •Check current branch status:
!git status - •Stash any uncommitted changes if needed:
!git stash - •Checkout main branch:
!git checkout main - •Fetch latest changes from remote:
!git fetch origin main - •Pull and merge remote changes:
!git pull origin main - •If there were stashed changes, ask user if they want to reapply them
Report to the user:
- •Whether the local main was already up to date or what changed
- •Number of commits pulled
- •Any conflicts that need resolution