git-pp


Namegit-pp JSON
Version 1.10.9 PyPI version JSON
download
home_pagehttps://github.com/tddschn/git-pp
SummaryA (tiny) Git utility for auto-committing and concurrent pushing
upload_time2024-01-04 21:04:15
maintainer
docs_urlNone
authorXinyuan Chen
requires_python>=3.10,<4.0
licenseMIT
keywords git asyncio
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # git pp

A (tiny) Git utility for auto-committing and concurrent pushing.

Powered by `asyncio`, with no dependency besides `python>=3.10` and `git`.

- [git pp](#git-pp)
  - [Features](#features)
  - [Demo](#demo)
  - [Use cases and example usage](#use-cases-and-example-usage)
  - [Installation](#installation)
    - [pipx](#pipx)
    - [pip](#pip)
    - [AUR](#aur)
  - [Usage](#usage)
  - [Develop](#develop)
## Features
- Auto-stages and commits with custom or generated commit messages
- Pushes to multiple or all remotes of a git repository **concurrently** with `asyncio`
- Operates on **any number of git repositories** at the same time

## Demo

<!-- [![asciicast](https://asciinema.org/a/487579.png)](https://asciinema.org/a/487579) -->
<!-- <a href="https://asciinema.org/a/487579"><img src="https://asciinema.org/a/487579.png" alt="asciicast" style="width:500px;height:300px;"></a> -->
<a href="https://asciinema.org/a/487579"><img src="https://asciinema.org/a/487579.svg" alt="Asciicast" width="650"/></a>

In this demo, git pp did the following in \~/config and \~/gui repos:

- (Concurrently) Auto staged all changes and commits with ISO-8601 timestamps as commit messages;
- (Concurrently) Pushed the changes in the checked out branch to all of their remotes, in this case, they’re origin and lab.

## Use cases and example usage
- You have multiple remotes registered on a local git repository (or more)
and want to push the changes to all or some of the remotes fast and efficiently.

```bash
# Use --push-only or -po

$ git pp --push-only # this pushes to all remotes of the current git repository, does not stages or commits
$ git pp --push-only --remote [one or more remotes] # only pushes to the specified remotes
$ git pp -po --timeout 10 # terminates pushing to one remotes if it takes more than 10 seconds
$ git pp -po -b dev ~/my-proj ~/my-proj2 # pushes the dev branch to all remotes in ~/my-proj and ~/my-proj2 repository
```

- You're tired of using `git add --all && git commit` every time you make a little change
and want to automate this across one or more repositories.

```bash
$ git pp # stages all files in the current git repository and commits with a timestamp as the commit message
$ git pp -m 'Initial commit' # custom commit message
$ git pp --no-status # don't show git status and git add outputs
```

And you can do both of the above (auto-commit and push) with `--push`:
```bash
# Use --push or -p

$ git pp --push # stages, commits and pushes to all remotes.
$ git pp --push --remote [one or more remotes]
$ git pp -p --timeout 10
$ git pp -p -b dev ~/my-proj ~/my-proj2
```

## Installation

First make sure the `git` executable is installed and in your `$PATH`.

Note that non-UNIX systems are not officially supported.

### pipx

This is the recommended installation method.

```
$ pipx install git-pp
```

### [pip](https://pypi.org/project/git-pp/)
```
$ pip install git-pp
```

### [AUR](https://aur.archlinux.org/packages/python-git-pp)
For Archlinux.
```
$ yay -S python-git-pp
```


## Usage

You can either invoke this tool with `git-pp` or `git pp`,
`--help` is unsupported when using the latter.

```
$ git pp -h
usage: git pp [-h] [-m COMMIT_MESSAGE] [-v] [-so] [-p] [-po] [-r REMOTE [REMOTE ...]] [-b BRANCH] [-f] [-t TIMEOUT] [DIRS ...]

Git utility for auto-committing and concurrent pushing

positional arguments:
  DIRS                  Dirs to operate on (default: ['.'])

options:
  -h, --help            show this help message and exit
  -m COMMIT_MESSAGE, --commit-message COMMIT_MESSAGE
                        commit message (default: None)
  -v, --version         show program's version number and exit
  -so, --status-only    Prints status only (default: False)
  -p, --push            Push to all remotes (default: False)
  -po, --push-only      Push to all remotes, without pre_pull (default: False)
  -r REMOTE [REMOTE ...], --remote REMOTE [REMOTE ...]
                        Remote name (default: None)
  -b BRANCH, --branch BRANCH
                        Branch name (default: None)
  -f, --force           Force push (default: False)
  -t TIMEOUT, --timeout TIMEOUT
                        Timeout for a single push (default: None)
```

## Develop
```
$ git clone https://github.com/tddschn/git-pp.git
$ cd git-pp
$ poetry install
```
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tddschn/git-pp",
    "name": "git-pp",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "git,asyncio",
    "author": "Xinyuan Chen",
    "author_email": "45612704+tddschn@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/7d/47/9dc9fa2d40bd647b3313c1b957b7967a7d4e50c2c0801958530b32e2c130/git_pp-1.10.9.tar.gz",
    "platform": null,
    "description": "# git pp\n\nA (tiny) Git utility for auto-committing and concurrent pushing.\n\nPowered by `asyncio`, with no dependency besides `python>=3.10` and `git`.\n\n- [git pp](#git-pp)\n  - [Features](#features)\n  - [Demo](#demo)\n  - [Use cases and example usage](#use-cases-and-example-usage)\n  - [Installation](#installation)\n    - [pipx](#pipx)\n    - [pip](#pip)\n    - [AUR](#aur)\n  - [Usage](#usage)\n  - [Develop](#develop)\n## Features\n- Auto-stages and commits with custom or generated commit messages\n- Pushes to multiple or all remotes of a git repository **concurrently** with `asyncio`\n- Operates on **any number of git repositories** at the same time\n\n## Demo\n\n<!-- [![asciicast](https://asciinema.org/a/487579.png)](https://asciinema.org/a/487579) -->\n<!-- <a href=\"https://asciinema.org/a/487579\"><img src=\"https://asciinema.org/a/487579.png\" alt=\"asciicast\" style=\"width:500px;height:300px;\"></a> -->\n<a href=\"https://asciinema.org/a/487579\"><img src=\"https://asciinema.org/a/487579.svg\" alt=\"Asciicast\" width=\"650\"/></a>\n\nIn this demo, git pp did the following in \\~/config and \\~/gui repos:\n\n- (Concurrently) Auto staged all changes and commits with ISO-8601 timestamps as commit messages;\n- (Concurrently) Pushed the changes in the checked out branch to all of their remotes, in this case, they\u2019re origin and lab.\n\n## Use cases and example usage\n- You have multiple remotes registered on a local git repository (or more)\nand want to push the changes to all or some of the remotes fast and efficiently.\n\n```bash\n# Use --push-only or -po\n\n$ git pp --push-only # this pushes to all remotes of the current git repository, does not stages or commits\n$ git pp --push-only --remote [one or more remotes] # only pushes to the specified remotes\n$ git pp -po --timeout 10 # terminates pushing to one remotes if it takes more than 10 seconds\n$ git pp -po -b dev ~/my-proj ~/my-proj2 # pushes the dev branch to all remotes in ~/my-proj and ~/my-proj2 repository\n```\n\n- You're tired of using `git add --all && git commit` every time you make a little change\nand want to automate this across one or more repositories.\n\n```bash\n$ git pp # stages all files in the current git repository and commits with a timestamp as the commit message\n$ git pp -m 'Initial commit' # custom commit message\n$ git pp --no-status # don't show git status and git add outputs\n```\n\nAnd you can do both of the above (auto-commit and push) with `--push`:\n```bash\n# Use --push or -p\n\n$ git pp --push # stages, commits and pushes to all remotes.\n$ git pp --push --remote [one or more remotes]\n$ git pp -p --timeout 10\n$ git pp -p -b dev ~/my-proj ~/my-proj2\n```\n\n## Installation\n\nFirst make sure the `git` executable is installed and in your `$PATH`.\n\nNote that non-UNIX systems are not officially supported.\n\n### pipx\n\nThis is the recommended installation method.\n\n```\n$ pipx install git-pp\n```\n\n### [pip](https://pypi.org/project/git-pp/)\n```\n$ pip install git-pp\n```\n\n### [AUR](https://aur.archlinux.org/packages/python-git-pp)\nFor Archlinux.\n```\n$ yay -S python-git-pp\n```\n\n\n## Usage\n\nYou can either invoke this tool with `git-pp` or `git pp`,\n`--help` is unsupported when using the latter.\n\n```\n$ git pp -h\nusage: git pp [-h] [-m COMMIT_MESSAGE] [-v] [-so] [-p] [-po] [-r REMOTE [REMOTE ...]] [-b BRANCH] [-f] [-t TIMEOUT] [DIRS ...]\n\nGit utility for auto-committing and concurrent pushing\n\npositional arguments:\n  DIRS                  Dirs to operate on (default: ['.'])\n\noptions:\n  -h, --help            show this help message and exit\n  -m COMMIT_MESSAGE, --commit-message COMMIT_MESSAGE\n                        commit message (default: None)\n  -v, --version         show program's version number and exit\n  -so, --status-only    Prints status only (default: False)\n  -p, --push            Push to all remotes (default: False)\n  -po, --push-only      Push to all remotes, without pre_pull (default: False)\n  -r REMOTE [REMOTE ...], --remote REMOTE [REMOTE ...]\n                        Remote name (default: None)\n  -b BRANCH, --branch BRANCH\n                        Branch name (default: None)\n  -f, --force           Force push (default: False)\n  -t TIMEOUT, --timeout TIMEOUT\n                        Timeout for a single push (default: None)\n```\n\n## Develop\n```\n$ git clone https://github.com/tddschn/git-pp.git\n$ cd git-pp\n$ poetry install\n```",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A (tiny) Git utility for auto-committing and concurrent pushing",
    "version": "1.10.9",
    "project_urls": {
        "Bug Tracker": "https://github.com/tddschn/git-pp/issues",
        "Homepage": "https://github.com/tddschn/git-pp",
        "Repository": "https://github.com/tddschn/git-pp"
    },
    "split_keywords": [
        "git",
        "asyncio"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2a56d804d030e2284e7959751f017128f18ea6b009d2fd5488876d3070d8e15a",
                "md5": "82e2457d7e1e8425da2d9e2e706ad8ed",
                "sha256": "d50fe79515549e1f1335ac855f7093fd14b22563533a2e7f4ab1e47e9742b2e0"
            },
            "downloads": -1,
            "filename": "git_pp-1.10.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "82e2457d7e1e8425da2d9e2e706ad8ed",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 8996,
            "upload_time": "2024-01-04T21:04:12",
            "upload_time_iso_8601": "2024-01-04T21:04:12.684318Z",
            "url": "https://files.pythonhosted.org/packages/2a/56/d804d030e2284e7959751f017128f18ea6b009d2fd5488876d3070d8e15a/git_pp-1.10.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7d479dc9fa2d40bd647b3313c1b957b7967a7d4e50c2c0801958530b32e2c130",
                "md5": "be33662e0446fa500931de3a83c12708",
                "sha256": "340c375f1bb5c285d5d92a9dfc2404404163a73a893dc45f3277673f4fdc5356"
            },
            "downloads": -1,
            "filename": "git_pp-1.10.9.tar.gz",
            "has_sig": false,
            "md5_digest": "be33662e0446fa500931de3a83c12708",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 8377,
            "upload_time": "2024-01-04T21:04:15",
            "upload_time_iso_8601": "2024-01-04T21:04:15.236045Z",
            "url": "https://files.pythonhosted.org/packages/7d/47/9dc9fa2d40bd647b3313c1b957b7967a7d4e50c2c0801958530b32e2c130/git_pp-1.10.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-04 21:04:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tddschn",
    "github_project": "git-pp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "git-pp"
}
        
Elapsed time: 0.16174s