Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I am writing a commit, I usually have the format:

filename: add something

I want commit to automatically add filename into the commit message, is that possible?

I know about commit templates, is there any variable I can use?

share|improve this question
1  
Although not an answer to your question: git already stores which files were added, so it's not really interesting to add as a comment. Better would be to add the reason (e.g. feature / bugfix /etc) why you added anything, also see programmers.stackexchange.com/questions/146127/… –  Matthijs P Apr 3 at 15:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.