Code Monkey home page Code Monkey logo

git-tag-helper's Introduction

Git Tag Helper

This shell script simplifies the git tagging process by providing an easy-to-use command for generating and pushing tags to the remote repository. The script enhances efficiency by utilizing the last git commit timestamp for generating the git tag. Additionally, if the current branch is not the main or master branch, it includes the branch name in the generated tag.

Features

  • Tag Generation:
    • Utilizes the last git commit timestamp for generating tags.
    • Includes the branch name in the tag if it is not the main or master branch.

Installation

  1. Copy the script to the bin directory:
    • Linux/Mac:
      # Create bin directory if it doesn't exist
      mkdir -p ~/bin
      # Copy the script to the bin directory
      cp tag-helper.sh ~/bin
      cd ~/bin
      chmod +x tag-helper.sh
      
  2. Update the command for runtime:
    • Open your shell configuration file (e.g., ~/.zshrc) using a text editor.
      vim ~/.zshrc
      
    • Add the following alias to the file:
      alias tag=~/bin/tag-helper.sh
      
    • Save the file and source the updated configuration:
      source ~/.zshrc
      

Usage

  1. Generate and push tags:
    • Once the command helper is configured, you can use the following command from the git repository (main or feature branch):
      tag -t true # generates and pushes the tag to the remote repository
      
    • Use tag -h to get suggestions about the repository.
  2. Example:
    • Tag helper is being used and updated on one of my repositories, and pushed multiple commits to github Repository.

Feel free to customize the script or the alias according to your preferences. This script enhances the efficiency of managing tags in your Git workflow.

git-tag-helper's People

Contributors

belwals avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.