This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# delete all git branches except main | |
function delete_all_branches_git() { | |
git checkout main | |
git branch | grep -v "main" | xargs git branch -D | |
} | |
# delete all git branches which start with prefix (except main) | |
function delete_branches_by_prefix_git() { | |
git checkout main | |
git branch | grep -v "main" | grep "$1" | xargs git branch -D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const fs = require('fs'); | |
/* | |
Possible usage: | |
node listFiles.js >> files.json | |
Don't forget to edit rootDirPath first. | |
*/ |