localgit


Namelocalgit JSON
Version 1.2.1 PyPI version JSON
download
home_pagehttps://github.com/natibek/localgit/tree/main
Summarylocalgit is a CL tool for managing multiple local git repo clones simultaneously.
upload_time2025-02-11 07:17:55
maintainerNone
docs_urlNone
authorNathnael Bekele
requires_python>=3.11.0
licenseApache 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # localgit

Command line tool for managing all local git repository clones simultaneously. It includes `status`, `pull`, `push`, `log`, and `list` commands which have similar functionalities as their `git` counterparts but affect all/specified local repositories.

To always ignore specific repositories or whole directories when using localgits, you can add them to environmental variables `LOCALGIT_EXCLUDE_REPO` and `LOCALGIT_EXCLUDE_DIR`. These environmental variables are `;` separated strings. Any local repository clone with a name matching one found in `LOCALGIT_EXCLUDE_REPO` and any local repository clone found within any of the directories in `LOCALGIT_EXCLUDE_DIR` will not be affected/checked by `localgit`.

## Installing

If using a Linux Distro, use [`pipx`](https://github.com/pypa/pipx) to install globally. Then:

```bash
pipx install localgit
```

Otherwise, install globally like usual for Windows and Mac.

## Common arguments

For all commands in localgit, the following CL optional arguments are available:

1. `repo_names`: The names of the folders with git repos to check/affect.
1. `--repo-directories`, `-r`: Directories with git repos to affect. Their validity is checked by the parser.
1. `--exclude`, `-x`: The names of the git repo folders you don't want to check/affect.
1. `--verbose`, `-v`: Print summary for all repos (including those that are already uptodate). \* \~
1. `--silent`, `-s`: Do not details of the command (including which files are modified/untracked for `status`, pulled for `pull`, and pushed for `push`.

_\* These flags are not available for `localgit log`._
_\~ The only flag used by `localgit list`._

## `localgit status`

Calls `git status` in each git repository clone.

Has the following arguments:

1. `--modified`: Only check for modified files. \~
1. `--untracked`: Only check for untracked files. \~
1. `--deleted`: Only check for deleted files. \~
1. `--commit-diffs`: Check how many commits ahead and behind the origin the local repo clone is. \*

_\~ Arguments are mutually exclusive._

_\* Uses `git rev-list --left-right --count <branch>...origin/<branch>`._

## `localgit pull`

Calls `git pull` in each git repository clone. It reports cases where there are merge conflicts, successful merges, and any errors that occur when pulling from the origin.

Has only the common arguments.

## `localgit push`

Calls `git commit -am "new updates" ; git push` in each git repository clone (therefore only commits and pushes modified files). Ensures that the local clone is not behind the origin.

Has the following arguments:

1. `--push-all`, `-A`: Push all the changes including untracked ones.
1. `--message`, `-m`: The commit message. Default is 'modified \<comma separated list of modified files>. added \<comma separated list of untracked files>.

## `localgit log`

Calls `git log --oneline` in each git reposotiry clone and reports the last 3 commit logs or less (if there are fewer) by default.

Has the following argument:

1. `--num-logs`, `-n`: The number of logs to show for each local repo. Default if 3.

## `localgit list`

Prints all the local repo clones found on the device. Formatted to show which will be excluded by the other commands with the `-A` flag.

Has the following argument:

1. `--exclude`, `-x`: The names of the git repo folders you don't want to check/affect.
1. `--all`, `-A`: List all the local git repo folders including those that would be excluded.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/natibek/localgit/tree/main",
    "name": "localgit",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11.0",
    "maintainer_email": null,
    "keywords": null,
    "author": "Nathnael Bekele",
    "author_email": "nwtbekele@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/62/33/fd297c32b1fffaa02294812d28fb29af5bf1ab82781a56aff46dfb56f54b/localgit-1.2.1.tar.gz",
    "platform": null,
    "description": "# localgit\n\nCommand line tool for managing all local git repository clones simultaneously. It includes `status`, `pull`, `push`, `log`, and `list` commands which have similar functionalities as their `git` counterparts but affect all/specified local repositories.\n\nTo always ignore specific repositories or whole directories when using localgits, you can add them to environmental variables `LOCALGIT_EXCLUDE_REPO` and `LOCALGIT_EXCLUDE_DIR`. These environmental variables are `;` separated strings. Any local repository clone with a name matching one found in `LOCALGIT_EXCLUDE_REPO` and any local repository clone found within any of the directories in `LOCALGIT_EXCLUDE_DIR` will not be affected/checked by `localgit`.\n\n## Installing\n\nIf using a Linux Distro, use [`pipx`](https://github.com/pypa/pipx) to install globally. Then:\n\n```bash\npipx install localgit\n```\n\nOtherwise, install globally like usual for Windows and Mac.\n\n## Common arguments\n\nFor all commands in localgit, the following CL optional arguments are available:\n\n1. `repo_names`: The names of the folders with git repos to check/affect.\n1. `--repo-directories`, `-r`: Directories with git repos to affect. Their validity is checked by the parser.\n1. `--exclude`, `-x`: The names of the git repo folders you don't want to check/affect.\n1. `--verbose`, `-v`: Print summary for all repos (including those that are already uptodate). \\* \\~\n1. `--silent`, `-s`: Do not details of the command (including which files are modified/untracked for `status`, pulled for `pull`, and pushed for `push`.\n\n_\\* These flags are not available for `localgit log`._\n_\\~ The only flag used by `localgit list`._\n\n## `localgit status`\n\nCalls `git status` in each git repository clone.\n\nHas the following arguments:\n\n1. `--modified`: Only check for modified files. \\~\n1. `--untracked`: Only check for untracked files. \\~\n1. `--deleted`: Only check for deleted files. \\~\n1. `--commit-diffs`: Check how many commits ahead and behind the origin the local repo clone is. \\*\n\n_\\~ Arguments are mutually exclusive._\n\n_\\* Uses `git rev-list --left-right --count <branch>...origin/<branch>`._\n\n## `localgit pull`\n\nCalls `git pull` in each git repository clone. It reports cases where there are merge conflicts, successful merges, and any errors that occur when pulling from the origin.\n\nHas only the common arguments.\n\n## `localgit push`\n\nCalls `git commit -am \"new updates\" ; git push` in each git repository clone (therefore only commits and pushes modified files). Ensures that the local clone is not behind the origin.\n\nHas the following arguments:\n\n1. `--push-all`, `-A`: Push all the changes including untracked ones.\n1. `--message`, `-m`: The commit message. Default is 'modified \\<comma separated list of modified files>. added \\<comma separated list of untracked files>.\n\n## `localgit log`\n\nCalls `git log --oneline` in each git reposotiry clone and reports the last 3 commit logs or less (if there are fewer) by default.\n\nHas the following argument:\n\n1. `--num-logs`, `-n`: The number of logs to show for each local repo. Default if 3.\n\n## `localgit list`\n\nPrints all the local repo clones found on the device. Formatted to show which will be excluded by the other commands with the `-A` flag.\n\nHas the following argument:\n\n1. `--exclude`, `-x`: The names of the git repo folders you don't want to check/affect.\n1. `--all`, `-A`: List all the local git repo folders including those that would be excluded.\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "localgit is a CL tool for managing multiple local git repo clones simultaneously.",
    "version": "1.2.1",
    "project_urls": {
        "Homepage": "https://github.com/natibek/localgit/tree/main"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "24c968578e242e84022cdb17beaa3f40aacabb1b45b80a663a088f679b9bf704",
                "md5": "337ad7fbf731aacc5138d9d52a815217",
                "sha256": "61f07c82ce1a06f4bfa35e7c85feeb22c4160dfb65c22113f659f4ad6353d613"
            },
            "downloads": -1,
            "filename": "localgit-1.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "337ad7fbf731aacc5138d9d52a815217",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11.0",
            "size": 19788,
            "upload_time": "2025-02-11T07:17:54",
            "upload_time_iso_8601": "2025-02-11T07:17:54.136024Z",
            "url": "https://files.pythonhosted.org/packages/24/c9/68578e242e84022cdb17beaa3f40aacabb1b45b80a663a088f679b9bf704/localgit-1.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6233fd297c32b1fffaa02294812d28fb29af5bf1ab82781a56aff46dfb56f54b",
                "md5": "ecb8bd92507586c9daed0f3399e2245b",
                "sha256": "bf5ab4c04f10acdafedbfcf39d71ae58b0c2ddd9ec863970d43d06c300c054de"
            },
            "downloads": -1,
            "filename": "localgit-1.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ecb8bd92507586c9daed0f3399e2245b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11.0",
            "size": 15614,
            "upload_time": "2025-02-11T07:17:55",
            "upload_time_iso_8601": "2025-02-11T07:17:55.518537Z",
            "url": "https://files.pythonhosted.org/packages/62/33/fd297c32b1fffaa02294812d28fb29af5bf1ab82781a56aff46dfb56f54b/localgit-1.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-11 07:17:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "natibek",
    "github_project": "localgit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "localgit"
}
        
Elapsed time: 1.17023s