Skip to content

Instantly share code, notes, and snippets.

View nibro7778's full-sized avatar
🎯
Focusing

Niraj Trivedi nibro7778

🎯
Focusing
View GitHub Profile
@nibro7778
nibro7778 / git_custom_command_win.md
Created April 4, 2018 12:25 — forked from lucijafrkovic/git_custom_command_win.md
Add custom git command (Windows)

Creating a custom git command in Windows

  1. create a cmd/bat file with the command. E.g. retag.cmd, save it in C:\git-scripts for example

  2. add your git commands to the file. For example, this set of commands deletes the specified tag from your current branch both locally and remotely, then tags it with the same tag and pushes the change remotely

    git tag -d %1

    git push origin :refs/tags/%1