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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Smart Commit hashtag command appearing in commit message Edited

Hi,

I'm using smart commits from my command line when working with my repos and I find it to be quite useful, especially when updating JIRA tickets

My only problem with it is when I look at the commit messages in Bitbucket it lists the smart commit command as part of the commit message. Which looks terrible when you view it in the BB GUI

Example

Lets say I issue the following commit message from bash:

git commit -am 'DEVOPS-380 #comment Test Comment 1'

If I then view the message in my JIRA ticket I see it as:

Test Comment 1

If I look at the commit history in Bitbucket I see it as:

DEVOPS-380 #comment Test Comment 1

 

I don't want the '#comment' command to appear in my commit history in Bitbucket - I assume this NOT what you want the functionality to do either?

 

Bitbucket Version - "Atlassian Bitbucket v6.4.1"

 

Thanks

1 answer

1 accepted

0 votes
Answer accepted

Hi Martin,

This is the expected behaviour - Bitbucket Server always displays the entire commit message.

Cheers,

Christian

Premier Support Engineer

Atlassian

Hi @Christian Glockner - thanks for the quick reply

Can I ask why is it expected behavior - as in what purpose does it serve to the have the Smart Commit command visible in the commit message in BB?

From my point-of-view I cannot see any real purpose for it there and it just looks ugly and adds unnecessary data to the screen

Happy to be corrected by you though if you can point out something obvious that I'm missing :)

Many Thanks,

Martin 

Hi Martin,

Keep in mind that not every Bitbucket Server customer is necessarily using Jira (i.e. not every customer is making use of Smart Commits), but may well have a good reason for using strings like "#comment" or "#time" in their commit messages, so it makes sense to display them as-is.

The other aspect is that Bitbucket Server at its core is a git repository hosting solution, and as such should display git repository data as-is, and that includes commit messages.

If you feel very strongly that this shouldn't be the case, feel free to raise a suggestion at https://jira.atlassian.com/secure/Dashboard.jspa via the Create button at the top.

Cheers,

Christian

Premier Support Engineer

Atlassian

@Christian Glockner that makes perfect sense, thanks for the reply again 

 

Cheers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,892 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you