Skip to main content

A git add/commit/push helper

Project description

git-commitflow - A Git add/diff/commit/push Helper

The git-commitflow is command-line interface that assists with the Git operations of adding (git add), viewing differences (git diff), committing changes (git commit), and pushing updates (git push).

One significant benefit of the git-commitflow tool is that it enhances the user's awareness and control over their changes before committing. By providing a simple command-line interface for viewing differences with git diff, users can carefully review modifications and ensure they are committing only the intended changes. This reduces the likelihood of including unintended files or alterations in commits, promoting a cleaner and more organized version history. Additionally, the tool simplifies the workflow for adding, committing, and pushing changes, making the overall Git experience more efficient and user-friendly.

Requirements

  • git >= 2.6
  • Python and pip

Installation

Here is how to install git-commitflow using pip:

pip install --user git-commitflow

The pip command above will install the git-commitflow executable in the directory ~/.local/bin/.

Usage

Example usage

To use the tool within your Git repository, run:

git commitflow

This command will guide you through the following steps interactively:

  • Stage untracked files: Prompts you to git add any untracked files that haven't been staged.
  • Review changes: Displays a diff of your changes, allowing you to confirm whether you want to proceed with the commit.
  • Commit changes: Once you validate your commit message, the tool will finalize the commit.

If you also wish to push the changes, you can use the --push option:

git commitflow --push

This will git add, diff, commit, push your changes to the remote repository after the commit.

Command-line arguments

usage: git-commitflow [--option] [args]

Readline manager.

options:
  -h, --help       show this help message and exit
  -p, --push       Git push after a successful commit
  -r, --recursive  Apply git-commitflow to all submodules

Customizations

Git configuration alias

To enhance your workflow, add the following aliases to your ~/.gitconfig file:

[alias]
ci = commitflow
cip = commitflow --push

With these aliases, you can conveniently use the commands git ci to commit changes and git cip to commit and push in a single step.

License

Copyright (c) 2020-2024 James Cherti

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git-commitflow-1.0.1.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

git_commitflow-1.0.1-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file git-commitflow-1.0.1.tar.gz.

File metadata

  • Download URL: git-commitflow-1.0.1.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for git-commitflow-1.0.1.tar.gz
Algorithm Hash digest
SHA256 c3c5ddd7abd8ad769bc310f288fb12357a268919d5f6ee950d45cca61a708709
MD5 9f404851f302a5cec064609ccf377d96
BLAKE2b-256 acd994ac9abdad0b4a7ced999f19f41bab2fcbc9a23b8a3edd17bd52560c01ca

See more details on using hashes here.

File details

Details for the file git_commitflow-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for git_commitflow-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8f9735b0d4740fdd41a4dd9fc17d3fa7154cdee973e18506ae5d8a94c496e30
MD5 52c45f3a2e17fda4cf024022ae711491
BLAKE2b-256 565f57050c01c38ef744276d144c7110784996262006d98a05c0bc4a320e5fc0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page