Coder Social home page Coder Social logo

git_tag_demo's Introduction

One Min Introduction to GIT TAG!

In this Tutorial we will learn about Git Tag. It will take just one mintue to get a basic idea about git tag. Let's start

  • What are git tags?
  • Tagging in git or any other vcs refers to creating specific points in history for your repository/data. This is usually done to mark release points like: v1.0, v1.1, .....


  • Why should i create git tags?
  • To mark release points for your code/data. To create historic restore points.


  • When to create git tags?
  • When we want to create a release point for a stable version of our code. When we want to create a historic point for our code/data that can refer at any future time.

  • How to create tags in Git?
  • We can create tags in 4 steps:

    1. Checkout to the branch in which we want to attach git tag: git checkout master
    2. Create tag with specific version name: git tag v1.0
      We can also create annotated tag: git tag -a v1.1 -m "tag for release v1.1"
    3. Display/Show tags: git tag -l "v1.*"
    4. Push tags to remote: git push origin v1.0
      Push all tags at once: git push origin --tags or git push --tags

  • How to delete git tags?
    • Delete tag from local: git tag -d v1.0
    • Delete from remote:
      • git push origin -d v1.0
      • git push origin --delete v1.0
    • Delete multiple tags at once:
        Delete from local: git tag -d v1.0 v1.1
        Delete from remote: git push origin -d v1.0 v1.1


  • How do we checkout tags in git?
  • We can't checkout tags in Git. We can create a branch from a tag and checkout the branch: git checkout -b releasevar1 v1.0


  • Can i create a tag from some past commit?
  • Yes. git tag v1.2 5fcdb03(commit name)

git_tag_demo's People

Contributors

shshetudev 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.