Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7963951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:44:57+00:00 2026-06-04T05:44:57+00:00

When I tag versioned code in git, I like using bullet points in the

  • 0

When I tag versioned code in git, I like using bullet points in the tag message.

This can easily be done with annotated tags:

git tag -a v1.0.0

* Change number 1
* Change number 2
#
# Write a tag message
#

However, if I attempt the same tag with the -m option, the tag message is not what I expect:

git tag -a v1.0.0 -m "* Change number 1\n* Change number 2"

git show v1.0.0

...

* Change number 1\n* Change number 2
....

The ‘\n’ was interpreted literally as the characters ‘\’ and ‘n’ instead of a newline. I want to use the -m option so that I can automate the tagging process.

Is there any way to include actual newline characters using git tag with the -m option?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:44:58+00:00Added an answer on June 4, 2026 at 5:44 am

    The closest solution I found is to use multiple -m options, one for each line. For example:

    git tag -a v1.0.0 -m "* Change number 1" -m "* Change number 2"
    

    from git-tag man page:

    -m <msg>
       Use the given tag message (instead of prompting). If multiple
       -m options are given, their values are concatenated as separate
       paragraphs. (...)
    

    UPDATE: Check “Add line break to git commit -m from command line” for more shell-based solutions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently, I have this code to prepend a tag to an exception message which
Until recently, I posted Python code (whitespace matters) to blogspot.com using something like this:
I've been using git for some time now and understand how commits work, tags,
We use git to manage our code, and just create one tag when release
I've won the task of restructuring/recreating an existing code repository, either using Git or
Edit : The bug that caused this problem has been fixed. The @version tag
Tag this with send-me-the-codez if you will. I've been asked to assist in putting
Using Spring 2.5 tag library, I have an Integer value in a command form
html code meta tag description, it is generated dynamically and we have quotes in
I have defined a tag with a CSS attribute overflow set to scroll. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.