Closed jcansdale closed 5 years ago
Dude, this is amazing!!!!
A couple of questions:
Also, perhaps this extension should be renamed to Git Sync or something similar. Thoughts?
@madskristensen,
If there are local changes and a pull is executed automatically, what happens if there are merge conflicts?
I think in that case the following would apply.
We could automatically show the Team Explorer - Synchronization
page in this situation?
Should there be a setting that prevents local branches from being deleted?
As long as we're never deleting unpublished commits, I wouldn't worry about it too much. I'm terrible for leaving old branches around, so this will definitely help me. 😄
Also, perhaps this extension should be renamed to Git Sync or something similar. Thoughts?
Yes, I think that might be an idea. Since it doesn't merge in new commits (only warns about them), I guess it isn't technically ding a pull (which is a fetch+merge). Git Sync
is maybe a better description of what it's doing.
There is a related type of syncing that is a hassle and easy to forget about when you're working on a fork. That is syncing branches with the upstream repo. https://help.github.com/articles/syncing-a-fork/
Maybe the extension could offer to do this as well in a future version (if the user has an upstream
remote defined). 🤔
Rather than pulling just the current branch, pull all branches in the repository and delete branches that appear merged and have had their upstream branch deleted.
This means that if the user changes to a different branch, this branch will already be up to date and there will be no need to pull again with the solution loaded (which can be expensive and trigger project/solution reloads).
This implementation embeds hub and executes the
sync
command, see: https://hub.github.com/hub-sync.1.htmlWhen text is written the the
Output
pane before it has been activated, the window can appear blank. Here is an example form theLearn the Shortcut
extension:To avoid this and let the user know when something is happening, this PR will activate the
Output
window immediately before creating a pane and writing any output.If no branches require syncing and there is nothing to output, the following message will appear on the status bar: