File: git-clear-soft

package info (click to toggle)
git-extras 7.4.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 2,120 kB
  • sloc: sh: 4,312; python: 994; makefile: 146
file content (7 lines) | stat: -rwxr-xr-x 243 bytes parent folder | download
1
2
3
4
5
6
7
#!/usr/bin/env bash

echo -n "Sure? - This command may delete files that cannot be recovered. Files and directories in .gitignore will be preserved [y/N]: "
read -r answer
if [ "$answer" = "y" ]
    then git clean -d -f && git reset --hard
fi