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.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The question is if it could default to blank?
It is just an extra step to remove the text every time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.