Last active
June 20, 2021 18:35
-
-
Save KaceCottam/f66b45dc4f963a6a1b3fe56d820913e1 to your computer and use it in GitHub Desktop.
various extra git commands
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
#!/bin/bash | |
# A git command for adding files to the gitignore | |
for i in $*; do echo $i >> .gitignore; done | |
git add .gitignore |
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
#!/bin/bash | |
# A git command for listing tracked files | |
# from https://stackoverflow.com/questions/15606955/how-can-i-make-git-show-a-list-of-the-files-that-are-being-tracked | |
ls --group-directories-first --color=auto -d $(git ls-tree $(git branch | grep \* | cut -d " " -f2) --name-only) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment