Last active
August 21, 2020 14:23
-
-
Save omarrodriguez15/18a857c71b45d7bf418e3aafe37f5c68 to your computer and use it in GitHub Desktop.
Collection of powershell one liners for git. I believe there is a more efficient call that deletes multiple tags based on a regex but can't find it.
This file contains hidden or 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 -l "test-18.*" | %{git tag -d $_} | |
| git tag -l "build-*-18.4.0.*" | %{ git push origin --delete $_; git tag -d $_ } | |
| # Don't show file in changes | |
| git update-index --skip-worktree <file> | |
| # List files you are skipping | |
| git ls-files -v . | sls ^S | |
| # Undo skip file | |
| git update-index --no-skip-worktree <file> | |
| # Create tag | |
| git tag -a <tag-name> <commit-id> -m "<message>" | |
| # Push tag to remote | |
| git push origin <tag-name> | |
| # Delete tag | |
| git tag -d <tag-name> | |
| # Delete tag from remote | |
| git push -d origin <tag-name> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment