# git-smartmv - A tool that can decide whether to use `git mv` or `mv`
The `git-smartmv` command-line tool, written by [James Cherti](https://www.jamescherti.com),
allows moving files and/or directories without having to worry about
manually choosing whether to use `git mv` or `mv`.
It can determines whether to use `git mv` or `mv` based on the source and the
destination path:
- If the files/directories are being moved within a Git repository,
`git-smartmv` uses `git mv`.
- If the files/directories are being moved between a Git repository and a
non-Git directory or a different Git repository, `git-smartmv` uses `mv`.
## Installation
```
sudo pip install git-smartmv
```
## Shell alias
To simplify the usage of this tool, you can add the following line to
your `~/.bashrc`:
```
alias mv="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
Distributed under terms of the GNU General Public License version 3.
## Links
- [Git-smartmv @PyPI](https://pypi.org/project/git-smartmv/)
- [Git-smartmv @GitHub](https://github.com/jamescherti/git-smartmv/)
Raw data
{
"_id": null,
"home_page": "https://github.com/jamescherti/git-smartmv",
"name": "git-smartmv",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6, <4",
"maintainer_email": "",
"keywords": "",
"author": "James Cherti",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/1b/ab/a3e2f80e014c704465b406b44537c79d56c014d58b4ff8d304bf0bb4af61/git-smartmv-1.0.2.tar.gz",
"platform": null,
"description": "# git-smartmv - A tool that can decide whether to use `git mv` or `mv`\n\nThe `git-smartmv` command-line tool, written by [James Cherti](https://www.jamescherti.com),\nallows moving files and/or directories without having to worry about\nmanually choosing whether to use `git mv` or `mv`.\n\nIt can determines whether to use `git mv` or `mv` based on the source and the\ndestination path:\n- If the files/directories are being moved within a Git repository,\n `git-smartmv` uses `git mv`.\n- If the files/directories are being moved between a Git repository and a\n non-Git directory or a different Git repository, `git-smartmv` uses `mv`.\n\n## Installation\n\n```\nsudo pip install git-smartmv\n```\n\n## Shell alias\n\nTo simplify the usage of this tool, you can add the following line to\nyour `~/.bashrc`:\n```\nalias mv=\"git-smartmv\"\n```\n\n## Usage\n\nThe `git-smartmv` command-line tool accepts similar arguments as the `mv`\ncommand, including the source file or directory to be moved, and the\ndestination file or directory.\n```\nusage: git-smartmv [--option] <SOURCE>... <DEST>\n\noptions:\n -w WARNING_THRESHOLD, --warning-threshold WARNING_THRESHOLD\n This will raise a warning if the number of files or directories being moved\n exceeds the specified amount\n -v, --verbose Report the names of the files and/or directories as they are being moved.\n -f, --force Force renaming or moving of files and/or directories even if the destination\n exists.\n -p, --non-interactive\n Do not prompt the user to confirm before executing 'mv' and/or 'git mv'\n commands.\n```\n\nFirst example:\n```\ngit smartmv file1 file2\n```\n\nSecond example:\n```\ngit smartmv file1 dir1/ file2 file3 directory/\n```\n\nThird example (non-interactive):\n```\ngit smartmv --non-interactive dir1/ dir2/\n```\n\n## License\n\nDistributed under terms of the GNU General Public License version 3.\n\n## Links\n\n- [Git-smartmv @PyPI](https://pypi.org/project/git-smartmv/)\n- [Git-smartmv @GitHub](https://github.com/jamescherti/git-smartmv/)\n",
"bugtrack_url": null,
"license": "",
"summary": "A command-line tool that can decide whether to use `git mv` or `mv`.",
"version": "1.0.2",
"project_urls": {
"Homepage": "https://github.com/jamescherti/git-smartmv"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "26916af2025755b8064f1ac0034e5641d3f557ed1c5fbc0b5d131b446d4fd797",
"md5": "0020477f6e7b6aea1dbfd05c7a3c0b3c",
"sha256": "50aed5db948037d6c1c2f0e3c431eca3da29faf615a83e4bff682522bfbf6139"
},
"downloads": -1,
"filename": "git_smartmv-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0020477f6e7b6aea1dbfd05c7a3c0b3c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6, <4",
"size": 18182,
"upload_time": "2023-05-03T22:15:16",
"upload_time_iso_8601": "2023-05-03T22:15:16.627001Z",
"url": "https://files.pythonhosted.org/packages/26/91/6af2025755b8064f1ac0034e5641d3f557ed1c5fbc0b5d131b446d4fd797/git_smartmv-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1baba3e2f80e014c704465b406b44537c79d56c014d58b4ff8d304bf0bb4af61",
"md5": "d01a10db459861d333522e02de6184f8",
"sha256": "af917cf032eb7b68ae43932361b208e09bf5c74931bf4c9495f72b06a4b2af4a"
},
"downloads": -1,
"filename": "git-smartmv-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "d01a10db459861d333522e02de6184f8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6, <4",
"size": 17392,
"upload_time": "2023-05-03T22:15:18",
"upload_time_iso_8601": "2023-05-03T22:15:18.647786Z",
"url": "https://files.pythonhosted.org/packages/1b/ab/a3e2f80e014c704465b406b44537c79d56c014d58b4ff8d304bf0bb4af61/git-smartmv-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-03 22:15:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jamescherti",
"github_project": "git-smartmv",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "git-smartmv"
}