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
# ag <https://github.com/ggreer/the_silver_searcher> | |
# usage: ag-replace.sh [search] [replace] | |
# caveats: will choke if either arguments contain a forward slash | |
# notes: will back up changed files to *.bak files | |
ag -0 -l $1 | xargs -0 perl -pi.bak -e "s/$1/$2/g" | |
# or if you prefer sed's regex syntax: | |
ag -0 -l $1 | xargs -0 sed -ri.bak -e "s/$1/$2/g" |
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 local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
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
git tag -d 12345 | |
git push origin :refs/tags/12345 | |
/* That will remove '12345' from the remote repository. */ | |
/* http://nathanhoad.net/how-to-delete-a-remote-git-tag */ |