localgit is a CL tool for managing multiple local git repo clones simultaneously.
Project description
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
to install globally. Then:
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:
repo_names
: The names of the folders with git repos to check/affect.--repo-directories
,-r
: Directories with git repos to affect. Their validity is checked by the parser.--exclude
,-x
: The names of the git repo folders you don't want to check/affect.--verbose
,-v
: Print summary for all repos (including those that are already uptodate). * ~--silent
,-s
: Do not details of the command (including which files are modified/untracked forstatus
, pulled forpull
, and pushed forpush
.
* 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:
--modified
: Only check for modified files. ~--untracked
: Only check for untracked files. ~--deleted
: Only check for deleted files. ~--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:
--push-all
,-A
: Push all the changes including untracked ones.--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:
--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:
--exclude
,-x
: The names of the git repo folders you don't want to check/affect.--all
,-A
: List all the local git repo folders including those that would be excluded.
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
Built Distribution
File details
Details for the file localgit-1.1.1.tar.gz
.
File metadata
- Download URL: localgit-1.1.1.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f19597d74d7b6a360e4317558485facd3e909b49d557fe7b12f6f17661cc6488 |
|
MD5 | 502d8bb61c8a54d66b37f97ab6a976c4 |
|
BLAKE2b-256 | 21c3ea8c6a3b9c6d60255f9eeb24ecaa50074bcba63feedd67899224c27ee1ae |
File details
Details for the file localgit-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: localgit-1.1.1-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d11f979c9ccb52be6f716fb132724262c750b718d4dced10b4773ea86bc8af42 |
|
MD5 | 0269200b3b463b71fe63ff275ba7a8a8 |
|
BLAKE2b-256 | eb212266042f6745a08593cc98ec94e8c8afe959606112eeb7bd6462f85f7133 |