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

SourceTree comments in commit message (starting with '#')

When using commit.template config (see https://answers.atlassian.com/questions/143622/git-config-commit-template-apparently-not-working) SourceTree reads the template file just fine. When committing, it doesn't ignore lines starting with '#' though, as it was designed by git.

In the terminal, when committing with a message that contains lines starting with a '#', git ignores those lines and does not make them part of the actual commit message. SourceTree on the other hand makes them part of the actual commit message.

Is this behaviour wanted? If yes, why?

I want commit message templates that explain where what goes, specifying keywords that dynamically interact with a project management platform (Redmine, http://www.redmine.org/projects/redmine/wiki/RedmineSettings#Referencing-issues-in-commit-messages) as comments that should be ignored in the actual commit message.

I'm currently working with SourceTree 1.5.2.0 on Windows 8 and system Git version 1.9.0

Thanks!

1 answer

The reason it's done that way is that the file-specific log is currently just linear (no graph, just a simple history) to show how the file got into that state. If in the future the history diverged into multiple branches that wouldn't work. For simplicity the file history was kept to just 'how did I get here'.

An alternative is to use the File Status view (Cmd-1), switch to 'Show All' and start typing the name of the file in the search to find it quickly, then do Log Selected from there, which will give you all the history to the current day.

I get irritated by this regularly too, and have a UX suggestion. How about showing all the commits on this file that are ancestors of head? That way you'd have a linear history and I think that's what I usually want.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted Jan 17, 2019 in Sourcetree

[dev team] Sourcetree for Windows 2019 Preview - Dark Theme

Hi folks, While the full post is over on our blog I'd like to share the dark theme we've got planned for 2019 here directly as well to keep the discussion going.  The ...

1,367 views 13 14
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you