Relative Content

Tag Archive for gitgit-commit

Automated git message formatting

I am looking for automated way to create commit message of specified format in Git. So that, when I type git commit, I would see Vim editor with already preformatted commit message, like this:

Is there a way to force git to commit an unchanged file?

I know that this is not normal practice and that my question is a “long shot”. But is there a way force git to commit an unchanged file, so as to run githooks when the commit is pushed to GitHub, as well as for other post processing. I need git log <file> to show the commit in the file’s change history even though the file wasn’t changed.

Is there a way in Git to Stash some change files?

Sometimes I need to save just one file of all the code changes, but the Stash command takes all the changes. Is there a way to save only one of the modified files? Or some lines from those files?