Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@akornmeier
Copy link
Owner

Update

  • Transform gsync from alias to standalone script in bin/
  • Auto-detect and pull from remote's default branch
  • Find local branches with no matching remote branch
  • Warn about unpushed commits before prompting to delete
  • Interactive prompts for force-deleting unmerged branches
  • Auto-detect pnpm projects for build/test commands

  - Transform gsync from alias to standalone script in bin/
  - Auto-detect and pull from remote's default branch
  - Find local branches with no matching remote branch
  - Warn about unpushed commits before prompting to delete
  - Interactive prompts for force-deleting unmerged branches
  - Auto-detect pnpm projects for build/test commands
@akornmeier akornmeier self-assigned this Dec 12, 2025
Copilot AI review requested due to automatic review settings December 12, 2025 12:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR transforms gsync from a simple git alias into a comprehensive bash script that automates syncing with remotes, detecting and cleaning up stale local branches, and optionally running pnpm project commands. The implementation introduces intelligent branch detection and interactive prompts for safe branch cleanup.

Key Changes:

  • Replaces upstream tracking [gone] detection with direct comparison of local vs remote branches
  • Adds unpushed commit detection and warnings before deletion prompts
  • Implements interactive prompts for force-deleting branches with uncommitted work

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 5 comments.

File Description
bin/gsync Core script implementation with branch detection, cleanup logic, and interactive prompts
docs/plans/2025-12-12-gsync-script-design.md Design documentation reflecting the new implementation approach

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  Combine range specification into single quoted string to prevent
  potential word splitting issues with branch names.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

akornmeier and others added 3 commits December 12, 2025 08:08
  - The git log command shows commits not in default branch, not unpushed commits
  - A commit can be pushed to remote but still not merged into default branch
  - Updated comment, variable name, and user-facing message for accuracy
@akornmeier akornmeier merged commit 3d956bd into main Dec 12, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants