-
Notifications
You must be signed in to change notification settings - Fork 35.9k
Description
The following process is, supposedly, performed regularly:
- Clone a public repository.
- Add upstream remote to local repository.
- Checkout
masterbranch. - Create a feature branch.
- Commit changes.
- Upload changes to remote repository ("sync" in Visual Studio code).
- Create merge/pull request.
- ... wait days/weeks/months ...
- Fetch latest
masterbranch from public (upstream) repository. - Merge upstream master branch into local master branch.
- Rebase (current) feature branch from local master branch.
- Upload changes to remote repository ("sync" in Visual Studio code).
- ... wait days/weeks/months ...
- Fetch latest
masterbranch from public (upstream) repository. - Merge upstream master branch into local master branch.
- Rebase (current) feature branch from local master branch.
- 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 |
| ------------- |