Skip to main content

% git-commit(1) Version 0.1.1 | git-commit

git-commit

DESCRIPTION

git-commit commit without the hassle.

HOW

It performs at once a git:

  • pull with git-pull if commits have not been integrated from remote. See why
  • add all modified files
  • prepare the modified files
  • commit
  • and push

EXAMPLE

  • With an automatically generated message from the files in the commit
git-commit
git-exec c "My Commit Message"

SYNOPSIS

git-commit [--edit|-e] [Optional Commit Message]
  • if the commit message is not given, it will be generated with the files in the commit.
  • --edit or -e will let you edit the message

TIP

AMEND

If you modify some file and want to put them back in the last commit, just execute git-amend

git-amend

ALIAS

Git Alias

You can add it as Git alias in your ~/.gitconfig.

[alias]
c = "!git-commit"

Then you can use it

  • with git
git c
git-exec c

Bash Alias

You can add it as bash alias in your ~/.bashrc

alias gc = "git-commit"

Why we check for remote commit

If the repository does not check for non-integrated remote commits via git hooks (git-prepare) support, the push to the remote will be refused.