https://github.com/hacksore/gitrekt
comingsoon™
https://github.com/hacksore/gitrekt
Last synced: over 1 year ago
JSON representation
comingsoon™
- Host: GitHub
- URL: https://github.com/hacksore/gitrekt
- Owner: Hacksore
- Created: 2023-03-07T06:31:22.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-12T19:16:01.000Z (over 3 years ago)
- Last Synced: 2024-10-06T00:42:40.306Z (almost 2 years ago)
- Language: Rust
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gitrekt
wtf is this?
How to get into the monopain?
```
git clone https://github.com/Hacksore/how-to-use-eslint.git
cd how-to-use-eslint
git checkout cursed
yarn && yarn build
git checkout main
```
Now you are left with this 😞

tl;dr dont use this rust code instead use a bash function as told by the prophet @theprimagen so here it is.
```bash
function gitclean {
# Find all directories that are not ignored by git and store them in an array
ignored_dirs=($(git ls-files --others --exclude-standard --directory))
# Loop through all directories that are not ignored by git
for dir in "${ignored_dirs[@]}"; do
# Check if the directory contains any non-gitignored files/folders
if [[ -z $(git ls-files --directory "$dir") ]]; then
# If the directory contains only gitignored files/folders, remove it
echo "removing $dir"
rm -rf "$dir"
fi
done
}
```