git-smartmv - A tool that can decide whether to use git mv or mv
The git-smartmv command-line tool intelligently moves files and directories by selecting either git mv or mv based on the source and destination paths.
- When both the source and destination are within the same Git repository,
git-smartmvusesgit mv. - When moving files between a Git repository and a non-Git directory, or between different Git repositories, it defaults to
mv.
Installation
To install git-smartmv executable locally in ~/.local/bin/pathaction using pip, run:
sudo pip install --user git-smartmv
(Omitting the --user flag will install git-smartmv system-wide in /usr/local/bin/git-smartmv.)
Shell alias
To install the git-smartmv executable locally in ~/.local/bin/git-smartmv using pip, run:
alias mv="git-smartmv"
(Omitting the --user flag will install git-smartmv system-wide in /usr/local/bin/git-smartmv.)
Usage
The git-smartmv command-line tool accepts similar arguments as the mv command, including the source file or directory to be moved, and the destination file or directory.
usage: git-smartmv [--option] <SOURCE>... <DEST>
options:
-w WARNING_THRESHOLD, --warning-threshold WARNING_THRESHOLD
This will raise a warning if the number of files or directories being moved
exceeds the specified amount
-v, --verbose Report the names of the files and/or directories as they are being moved.
-f, --force Force renaming or moving of files and/or directories even if the destination
exists.
-p, --non-interactive
Do not prompt the user to confirm before executing 'mv' and/or 'git mv'
commands.
First example:
git smartmv file1 file2
Second example:
git smartmv file1 dir1/ file2 file3 directory/
Third example (non-interactive):
git smartmv --non-interactive dir1/ dir2/
License
Copyright (C) 2023-2025 James Cherti
Distributed under terms of the GNU General Public License version 3.
Links
Metadata
Release files for git-smartmv 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| git-smartmv-1.0.5.tar.gz | 17.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| git_smartmv-1.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.1 kB
Release files / git-smartmv-1.0.5.tar.gz
| Download URL | git-smartmv-1.0.5.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e3079fc98af894fa3e6d6af797b236527fd14cd9fc0da2976c41db0347d1791
|
|
BLAKE2b-256 checksum How to use checksums |
7e229cf7fd9b5394ce347ac9bfc3b2be3e200c82f7c907f77aaa05165a9e8a58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.2
|
Release files / git_smartmv-1.0.5-py3-none-any.whl
| Download URL | git_smartmv-1.0.5-py3-none-any.whl |
|---|---|
| Size | 19.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
609eac38603141143db9ab938b8a0b2f4c0100159534394eaab30988eea74ab2
|
|
BLAKE2b-256 checksum How to use checksums |
8970a412c9328d27c3995f8a18160736800aead2603ad0a9e79ca31ae1ca9846
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.2
|
Security for git-smartmv 1.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.