Open jgallen23 opened 11 years ago
Where did you find this? I have started doing similar formatting in my commit messages, specifically using the body to explain more about my commit. I do like the very specific addition of
styleguide is from the angular project. Stumbled across is by finding this: https://github.com/btford/grunt-conventional-changelog
I really like the grunt task for that. Seems real solid. How does it compare to git-extras? Is that a replacement?
the grunt task is a little smarter
Yeah, I really like that it allows for you to specify the editor so you can tweak if you want. Are you going to start using this rather than git-extras?
not sure, have to try it.
Here's another one: https://medium.com/code-adventures/a940ee20862d
I like the idea of prefixing and naming branches with “add”, “remove”, “update”, “refactor”, “fix”
Ahh, that's your boy. Its actually pretty good wrap up with some good techniques.
I'm also a huge fan of how tpope (http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) suggests commit messages. Combined with TJ's style, you have a real solid branching and commit strategy.
Oh and when you figure out what you'd like to do for commit messages, you can enforce the style using git commit templates
Cool. I wish there was an automatic way to do that on the repo level
You should be able to. Its just a git config.
Finally, Git looks for configuration values in the config file in the Git directory (.git/config) of whatever repository you’re currently using. These values are specific to that single repository. Each level overwrites values in the previous level, so values in .git/config trump those in /etc/gitconfig, for instance. You can also set these values by manually editing the file and inserting the correct syntax, but it’s generally easier to run the git config command.
but you don't check in .git/config, so if I do a clone, will the template settings come with it?
But you can check it into a build directory, and then symlink it?
still means there's a step to create the symlink. We should probably investigate a little more
Oh I should have been more clear. It goes in the .gitconfig file within the repo.
[commit]
# custom commit message template
template = ~/.gitmessage
So we'd check in a .gitconfig and a .gitmessage file. That could work.
Yeah, I'm pretty sure that would work. I'll check it out on my work computer. But I think that's how I'm doing it.
Would like to come up with a styleguide for git commits. Here is an example, it's probably a little too strict for my tastes, but it's a start
https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/