Last active
September 21, 2022 23:10
-
-
Save HirogaKatageri/752a39c5a36442031641c2ac063ed107 to your computer and use it in GitHub Desktop.
Shell Script Commands: Git Shortcuts
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
# Add the following line to your ~/.bashrc or where your other shell commands are at. | |
# git.ignore: Untracks ignored files in Git. | |
# git.prune: Deletes local merged branches on current branch. It protects: (master, main, develop) | |
alias git.ignore='git add . && git commit -m "Committing all changes..." && git rm -r --cached . && git add . && git commit -m "Removing ignored tracked files..."' | |
alias git.prune='git branch --merged | egrep -v "(^\*|master|main|develop)" | xargs git branch -d' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment