Skip to Content
Linux Shell Scripting Cookbook - Third Edition
book

Linux Shell Scripting Cookbook - Third Edition

by Clif Flynt, Sarath Lakshman, Shantanu Tushar
May 2017
Beginner
552 pages
28h 47m
English
Packt Publishing
Content preview from Linux Shell Scripting Cookbook - Third Edition

How to do it...

The git tag command with no argument will list the visible tags:

    $ git tag
    release-1.0
    release-1.0beta
    release-1.1

You can create a tag on your current checkout by adding a tag name:

    $ git tag ReleaseCandidate-1

You can add a tag to a previous commit by appending an SHA-1 identifier to the git tag command:

    $ git log --pretty=oneline
    72f76f89601e25a2bf5bce59551be4475ae78972 Initial checkin
    fecef725fe47a34ab8b4488a38db446c6d664f3e Added menu GUI
    ad606b8306d22f1175439e08d927419c73f4eaa9 Added menu functions
    773fa3a914615556d172163bbda74ef832651ed5 Initial action buttons


    $ git tag menuComplete ad606b

The -a option will attach annotation to a tag:

    $ git tag -a tagWithExplanation
 # git opens your editor to create ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Linux Shell Scripting - Second Edition

Mastering Linux Shell Scripting - Second Edition

Mokhtar Ebrahim, Andrew Mallett

Publisher Resources

ISBN: 9781785881985