Labelling commits to group them in Git

Is there a way/common practice to label and group commits in Git? I understand that the de facto practice, for example, is to reference issue numbers preceded by an hash and people preceded by an at-sign (such as Fixed #23 or @userName), and applications like BitBucket or Github already parse these correctly.

I would like a way to group a certain type of commit so that I can easily reference them later. For example, sometimes I implement certain changes, but I know I’m going to modify them sooner or later: so I usually write for the time being in the commit message, so it is easier for me to just search the logs for such commits.

  • How to manage multiple versions of a project in Git
  • I cannot get git to unignore a subdirectory, even after excluding it in gitignore
  • What causes git to rewrite a commit rather than reusing the existing one?
  • Git2go: Simulate git checkout and an immediate git push
  • Git workflow to audit commits without rewriting history
  • Git SSH authentication
  • So, is there a way, common/best practice that is used in these cases? Or even a git tool I am not aware of?

  • Prepend a commit from master to a branch
  • Setting Git/SmartGit SSH Client's home folder
  • Moving a file to different folder along with history in git
  • EGit with Eclipse, what does this mean?
  • git diff: ignore renaming of variables
  • Why does Monodevelop ask me for a ssh key password when it is registered in ssh-agent
  • One Solution collect form web for “Labelling commits to group them in Git”

    You could use post-commit hooks in your repository to achieve this effect. Briefly:

    1. You commit with message, containing special label (example: @fancy_label)
    2. post-commit hook parsing your commit message and detects this @fancy_label (and other labels)
    3. post-commit hook after this adds this commit to list of commits for each label and saves it to persistent storage (to plain files, or even database)

    This persistent storage could be personal (non-committable in folder .git) or committable (included in project).

    And you need to make git aliases to make searching and listing of this commits by their respective labels easier.

    Git Baby is a git and github fan, let's start git clone.