Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Online edit - change default commit message

Øyvind Aaraas
Contributor
July 16, 2018

When editing a file online, is it possible to change the default commit message?

Best case scenario would be able to remove it completely and then make the user required to type in at least some characters before being able to commit.

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 16, 2018

Hi Øyvind, welcome to the Atlassian Community :)

You can do that form the command line. If you simply want to modify your last commit message, type:

git commit --amend

The command above loads the previous commit message into an editor session, where you can make changes to the message, save those changes and exit. When you save and close the editor, the editor writes a new commit containing that updated commit message and makes it your new last commit. You can learn more about it at Rewriting history.

Hope that helps!

Ana

Øyvind Aaraas
Contributor
July 16, 2018

Hi Ana,

You know when you are in inline edit mode in Bitbucket itself and the commit message by default says "yourfile.xyz was edited online with Bitbucket"? This is the text I would like to change.

Like Dovid Weisz likes this
Øyvind Aaraas
Contributor
July 18, 2018

Selection_016.png

Like # people like this
Øyvind Aaraas
Contributor
July 18, 2018

The question is if it could default to blank?

It is just an extra step to remove the text every time.

t0r0X
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 11, 2019

@Ana Retamal  I so much agree with @Øyvind Aaraas: the lack of a option to configure the default commit message is more than bothering, and more than irritating. I'm very angry about that. In my current project we use a 250 user server license, and many of the users just commit with the default message. There is no way to prohibit this user behaviour!

All commit checking plugins which do a regex check on the commit message do not verify the commit messages from the online editor! The only alternative: disable online editing feature... but where's the user experience then? Really disappointing.

Like # people like this
Cerno B April 15, 2019

@Ana RetamalThat's a workaround, but I second that a proper option to give a commit message when committing via web editor is an essential addition. The current solution messes up an otherwise beautiful commit history.

As far as the workaround goes, it's not really a solution. You are suggesting amending commit messages to commits that are by definition already pushed to the server by the online editor. But changing pushed commits is not allowed.

Torvalds quote on the matter: http://www.gelato.unsw.edu.au/archives/git/0702/38650.html

Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 15, 2019

Hi @t0r0X , @Cerno B ,

I've made a search and seems like we had a feature request for something similar to what you're asking:

Please read through the comments on that one as there's information that might be useful for you. If you find something missing or not clear enough, feel free to write a comment on that feature request so our developers can address it. 

There was also a message sent to the developers of one of these plugins (Yet Another Commit Checker) so they'd implement that functionality:

Keep in mind that the add-ons are created by third party so we have no control over them. 

Hope that helps!

Ana

Cerno B April 24, 2019

Hello @Ana Retamal

Edit: This was a reply explaining that we do not have a commit message dialog at all.

Sorry for the confusion, but this has been a case of a false memory. Apparently we do have the dialog but because nobody was filling a sensible commit message, I somehow remembered that there was no dialog at all.

Nevermind, but I second the idea to remove the default message to force the user to add a sensible commit message.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events