git-commit with setting committer and author automatically
git-commit-autouser sets name and email of committer and author automatically. The name and email are determined by the url of the remote origin.
$ gem install git-commit-autouser
Add the following settings to .gitconfig:
[autouser-github]
url-regexp = github.com
name = "Ryota Arai"
email = ryota.arai@gmail.com
[autouser-company]
url-regexp = git.company.com
name = "Ryota Arai"
email = ryota.arai@company.com
[alias]
ci = commit-autouser
Use git ci
instead of git commit
:
$ git ci
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)