Skip to content

Change clean.ps1 (and clean.cmd) to restore deleted files after cleaning #12281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2019

Conversation

dougbu
Copy link
Member

@dougbu dougbu commented Jul 17, 2019

@dougbu dougbu requested review from analogrelay and Tratcher July 17, 2019 16:20
@dougbu
Copy link
Member Author

dougbu commented Jul 17, 2019

/fyi @tebeco

@dougbu dougbu requested a review from a team July 17, 2019 16:22
@@ -38,4 +38,5 @@ if ($Help) {
exit 0
}

git clean -dix -e .dotnet/ -e .tools/ -e src/SignalR/clients/ts/FunctionalTests/node_modules/ @GitArguments
git clean -dix -e .dotnet/ -e .tools/ @GitArguments
git checkout -- $(git ls-files -d)
Copy link
Member

Choose a reason for hiding this comment

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

How is this different from git reset --hard?

Copy link
Member Author

Choose a reason for hiding this comment

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

It only restores deleted files where the deletion hasn't been staged. It also doesn't undo modifications to checked-in files, unstage anything, and so on.

@Eilon Eilon added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jul 18, 2019
@dougbu
Copy link
Member Author

dougbu commented Jul 18, 2019

Bump. Could someone please approve?

Copy link
Member

@Tratcher Tratcher left a comment

Choose a reason for hiding this comment

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

Verified locally.

@dougbu dougbu merged commit d641dff into master Jul 18, 2019
@ghost ghost deleted the dougbu/clean.better.6845 branch July 18, 2019 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants