Giter VIP home page Giter VIP logo

gitconfig's Introduction

gitconfig

📝 Some common git configs / hooks / templates that I use

Global config

The .gitconfig file is intended to be (at least part of) a user’s global ~/.gitconfig.

Commit message template

The .git-commit-template is also expected to live in the user’s home directory. If you wish to change its name or location on your own system, you’ll just need to update the commit.template property in the global template. In essence, here.

The main purpose of the commit message template is to make it easier for me to use gitmoji with my current tooling, rather than installing gitmoji-cli (which is also cool if you want to use that).

When I’m committing with magit (emacs 💖), and I’m presented with the template, I’ll just uncomment the most relevant emoji summary line, and modify the message to be specific to my commit. I imagine it should work similarly with whatever tools you use.

.git_template directory

The .git_template/ directory should be symlinked/copied into your home directory. This will be used to populate any new repos with the hooks/ directory, which has the hooks listed below.

If you’d rather not use this, then remove the [init] section from the .gitconfig.

This might be a good place to start if you want more information about having a template directory: https://git-scm.com/docs/git-init

prepare-commit-msg hook

There are a couple of things that it does currently:

  1. If it’s a merge commit, it will prefix the summary line with 🔀, because emoji are the future, and this is the one that gitmoji prescribes for merging branches. 😎

  2. If GitPython is installed, and the current branch name starts with either AEROGEAR- or AGMS- or 'INTLY-', then it will uncomment the JIRA_PLACEHOLDER line in the commit message template, and insert a link to the issue on issues.jboss.org.

Contributing

You want to make this even more awesome? That’s great! You can open a PR on Github (or any other repo hosting site that you may find this hosted), or email changes to me. Consider including a relevant gitmoji in the commit message!

If you fork and make your own custom changes but don’t want to bother proposing those changes back to the original repo (https://github.com/grdryn/gitconfig), that’s cool too; just consider sending me a link anyway so that I can see what cool things you’re doing. 😉

gitconfig's People

Contributors

grdryn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.