Skip to content

Add option to automatically stash changes before performing git pull#59849

Merged
joaomoreno merged 1 commit intomicrosoft:masterfrom
vladimir-kotikov:15671_autostash_on_pull
Jan 4, 2019
Merged

Add option to automatically stash changes before performing git pull#59849
joaomoreno merged 1 commit intomicrosoft:masterfrom
vladimir-kotikov:15671_autostash_on_pull

Conversation

@vladimir-kotikov
Copy link
Contributor

@vladimir-kotikov vladimir-kotikov commented Oct 2, 2018

This is an attempt to implement #15671 automatic stashing before pulling any changes (for both 'pull' and 'sync' commands). The behavior is controlled by new git.autoStash which is false by default. Stashing is performed only if any tracked files are changed, any changes in untracked/ignored files don't trigger this scenario.

Also did a small refactoring to dedupe and reuse some code between pull, pullWithRebase and pullFrom methods 😉

@joaomoreno joaomoreno added this to the Backlog milestone Oct 3, 2018
@joaomoreno joaomoreno added the git GIT issues label Oct 3, 2018
@joaomoreno
Copy link
Member

Thanks! 🍻

Ended up refactoring a little bit further.

@joaomoreno joaomoreno merged commit ae2d0cd into microsoft:master Jan 4, 2019
@vladimir-kotikov vladimir-kotikov deleted the 15671_autostash_on_pull branch January 4, 2019 15:20
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

git GIT issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants