Skip to content

Add "catch-up" sync option to Git extension #66462

@SetTrend

Description

@SetTrend

The following process is, supposedly, performed regularly:

  1. Clone a public repository.
  2. Add upstream remote to local repository.
  3. Checkout master branch.
  4. Create a feature branch.
  5. Commit changes.
  6. Upload changes to remote repository ("sync" in Visual Studio code).
  7. Create merge/pull request.

  1. ... wait days/weeks/months ...
  2. Fetch latest master branch from public (upstream) repository.
  3. Merge upstream master branch into local master branch.
  4. Rebase (current) feature branch from local master branch.
  5. Upload changes to remote repository ("sync" in Visual Studio code).

  1. ... wait days/weeks/months ...
  2. Fetch latest master branch from public (upstream) repository.
  3. Merge upstream master branch into local master branch.
  4. Rebase (current) feature branch from local master branch.
  5. Upload changes to remote repository ("sync" in Visual Studio code).

...

It is so much ado and it's so error prone when typing all these commands into the VS Code terminal. I regularly find myself deleting and manually re-creating my branches because my branch history gets bloated with foreign commits from the upstream's master branch plus redundant merge commits.

Suggestion

Wouldn't it make sense to add a context menu item to the Git panel, located at the sync label, automating steps 9 to 12, performing all the intricacies automatically, keeping the history intact and tidy? (Including the omission of redundant/empty merge commits.)

Additional Options

There should be an option to have the above suggested feature become the default "sync" behaviour of the VS Code Git panel.

Moreover, the suggested sync context menu should provide a new sub menu item, providing all three sync methods, so the user may interactively choose a different sync method:

| ------------------- |
| Sync with remote  > |
| --------- | Merge         |
            | Rebase        |
            | Catch-up      |
            | ------------- |

Metadata

Metadata

Assignees

Labels

*extension-candidateIssue identified as good extension implementationgitGIT issuesinfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions