Skip to content

Commit

Permalink
git: clean untracked files when switching branches
Browse files Browse the repository at this point in the history
As our set of gitignored files change, switching to older branches can
often lead to untracked files left around that need manual cleanup. We
could perhaps do this automatically.

Release note: None
  • Loading branch information
irfansharif authored and GustasValdavicius committed Jan 4, 2022
1 parent 94f434c commit bff20e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions githooks/post-checkout
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
set -e

if [ "$1" != "$2" ]; then # previous ref != new ref.
git clean pkg -fd
exec git submodule update --init --recursive
fi

0 comments on commit bff20e4

Please sign in to comment.