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!
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.
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.