A git repository updater
Project description
gitupdt
A Python tool for easily updating Git repositories. It checks for updates in remote repositories and allows you to pull branches or switch to tags through an interactive menu.
This tool is intended for use in execution-only repositories that are cloned for software usage purposes, without making edits. It is not recommended for use in development repositories.
Features
- Remote update check: Check if there are updates in the remote repository
- Interactive selection menu: Interactive CLI powered by questionary
- Branch pull: Update the current branch to the latest state
- Checkout to tag: Switch to a specified version tag
- Reset mode: Use
git reset --hardwith the--resetoption to update - requirements.txt change display and installation: Display changes in dependency files and support automatic installation
- Automatic virtual environment detection: Automatically detect
.venvorvenvfolders and display appropriate Python interpreter options - Repository maintenance: Automatically run
git gc --autoafter updates
Installation
pip install gitupdt
Usage
Update repository in current directory
gitupdt
Update repository at specified path
gitupdt /path/to/repo
Update with reset mode
When you specify the --reset option, it uses git reset --hard instead of git checkout or git pull to update. This is useful for forcibly overwriting a local file with a remote one when the local file is corrupted.
gitupdt --reset
gitupdt /path/to/repo --reset
Available Actions
When you run the tool, you can select from the following actions:
- Checkout and Pull latest remote: Checkout and pull the remote default branch
- Pull: Update the current branch to the latest state (when behind remote)
- Checkout to tag: Switch to a specified version tag (select from latest or past tags)
Automatic Installation on requirements.txt Changes
When there are changes in requirements.txt, the following process occurs:
- Changes are displayed in unified diff format
- You are prompted whether to install the updated
requirements.txt - You can select the appropriate Python interpreter:
- Currently running Python
- Detected virtual environment (
.venvorvenv) Python
pip install -r requirements.txtis executed with the selected Python interpreter- You can also choose to cancel and install manually later
Dependencies
- GitPython
- questionary
- packaging
Python Version
Python 3.9 or higher is required.
License
MIT License
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitupdt-1.0.0.tar.gz.
File metadata
- Download URL: gitupdt-1.0.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e629711f5ec1b8d64b99f58ce67676fc298ea6951fc8a5fdd77706f59a1d4df9
|
|
| MD5 |
0fa5851dd5d416c607da535f8b20cbff
|
|
| BLAKE2b-256 |
a838916073fa4a2c860191ab0be4291150f2ef0ad0ca7308f6ea58404d5f71b3
|
File details
Details for the file gitupdt-1.0.0-py3-none-any.whl.
File metadata
- Download URL: gitupdt-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0125937b190c902d2c2f9a0545185fa1ba6ab1ec8bce43d059ad37711dd2caa3
|
|
| MD5 |
852ac7048fea3d127ed704f6187ff614
|
|
| BLAKE2b-256 |
82707acee6081474ebb1fb9fc0c0caeed0eb77041701480d87468cb8de7ac3d6
|