Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to add comment (not message) to the commit via command line?

Hello,

 

Is there any way to add a comment to commit via command line? 

Or is it possible to do it via Sourcetree? 

Everything instructions so far what i have found is only via Bitbucket UI.  

 

Thank you in advance,

 

Jaanus

1 answer

0 votes
Erez Maadani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Nov 25, 2022

Hey @Jaanus Truuvaart 

For new commits:
git commit -m "line #1" -m "line #2"

For changing last commit message (given that it was not pushed yet):
git commit --amend -m "This is the updated commit message" 

For changing previous commits, you will need git rebase.

For a more detailed explanation, have a look here: https://www.atlassian.com/git/tutorials/rewriting-history 

Hi @Erez Maadani ,

Thank you for the reply, but actually I mean commit comment, not commit message. 

Payload is described here https://confluence.atlassian.com/bitbucketserver0721/event-payload-1115665959.html?utm_campaign=in-app-help&utm_medium=in-app-help&utm_source=stash#Eventpayload-repositoryevents

in  "Commit comment created" section and it's possible to add the comment via api to the commit or in UI, but i'm wondering is there also an option to add it via git command or via Sourcetree?

 Thank you in advance

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events