Maintain branch collection profiles for Git repositories
Project description
trackbranch
trackbranch is a tool for developers that can be used to store
collections of branches in the form of profiles. This can be useful
for situations where you have multiple branches to group into the
same action.
Installation
Users can install the trackbranch package via PyPi:
$ pip install trackbranch
Or, clone the repository, build it and install it with pip (depends on python==^3.6, poetry and pip):
$ poetry lock
$ poetry update
$ poetry build
$ pip install dist/*.whl
Getting Started
See trackbranch --help for details on command line arguments
and program usage.
Usage
Create a branch profile my-profile consisting of branch1 and branch2:
# Add branch1 and branch2 to my-profile.
$ trackbranch -p my-profile add branch1 branch2
added 'branch1' to 'my-profile'
added 'branch2' to 'my-profile'
This will automatically create a .trackbranch.json file if one
cannot be found in the current directory or upwards.
List all profiles:
$ trackbranch ls
my-profile: ['branch1', 'branch2']
List specific branches by providing -p|--profile:
# List branches in the my-profile collection.
$ trackbranch -p my-profile ls
branch1 branch2
For each branch in my-profile, execute the command -c. Each {br} string
format piece is replaced by the branch name.
# Execute -c for each branch found in my-profile.
$ trackbranch -p my-profile exec -c 'bash -c "git checkout {br}; git rebase -i base"'
Remove branch1 from my-profile.
# Remove branch1 from my-profile; branch2 remains.
$ trackbranch -p my-profile rm branch1
removed 'branch1' from 'my-profile'
Completely clear out my-profile.
# Clear my-profile.
$ trackbranch -p my-profile clear
profile 'my-profile' has been removed
License
This project operates under The MIT License.
Authors
| Name | |
|---|---|
| Kevin Morris | kevr@0cost.org |
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
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 trackbranch-0.1.5.tar.gz.
File metadata
- Download URL: trackbranch-0.1.5.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50e4adde6b8677e084dbb0310d4e2a6fc8c37fc58868adc5168f0e3bca484816
|
|
| MD5 |
a1326ba466cbede78adc2ff236fac5d7
|
|
| BLAKE2b-256 |
3a0c99459d0f3d6b1fac7451dd683a9667bb6d6af6fa85e5899d8631dabed190
|
File details
Details for the file trackbranch-0.1.5-py3-none-any.whl.
File metadata
- Download URL: trackbranch-0.1.5-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d50ac2cd1b6db307a2c9ff0667b060fa355e5c8948c4046b4165aa5ca1f51271
|
|
| MD5 |
5c0ce581b1d77b6798a366602a27e0ea
|
|
| BLAKE2b-256 |
61f4a9358ed49ecb5089bf69d502f69c11d77c5fda386a8ed212da5a543b8522
|