Skip to main content

A simple git wrapper to execute pre-commands and extensions

Project description

Git-wrapper

A git wrapper to execute pre-commands and extensions without using git-hooks

Available extensions

  • subtrees: list the subtrees currently present in the repository. Any previously created subtree that is no longer present in the repository won't be listed.
> wgit subtrees
Here the list of the available subtrees:
- A
- B

Available pre-commands

Each precommand is executed before the actual git command. Any other git command that does not have a pre-command will be executed as usual.

  • commit: store a list of subtree involved in the commit. The list is stored in a file having as name the branch name. Multiple commits will extend the list, if needed.
> wgit commit -m "chore: added v"
Checking for changes in subtrees...
Found changes in subtrees. Let's store them for a later push.
Stored them in /home/deg/.local/share/wgit/banana_to_push.txt.
[banana d0e49f5] chore: added v
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 B/v
  • push: push the changes to the subtree retrieved from the file generated in the pre-commit function.
wgit push
Start pushing changes to subtrees...
Changes pushed to subtree 'B'.
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 16 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 329 bytes | 329.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Analyzing objects... (3/3) (80 ms)
remote: Validating commits... (1/1) done (0 ms)
remote: Storing packfile... done (40 ms)
remote: Storing index... done (26 ms)
To ...
   810f375..d0e49f5  banana -> banana
  • pull: pull the changes from all the available subtrees.
> wgit pull
Changes pulled from subtree 'A'.
Changes pulled from subtree 'B'.
Already up to date.

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

wgit-0.0.3.tar.gz (16.3 kB view details)

Uploaded Source

File details

Details for the file wgit-0.0.3.tar.gz.

File metadata

  • Download URL: wgit-0.0.3.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.13

File hashes

Hashes for wgit-0.0.3.tar.gz
Algorithm Hash digest
SHA256 59c64f6645e20d78900cf8f9d25c1e23ac42d318cd78aaa8e187b5c5a42436f1
MD5 85d726388cef0d1264b5b7ef3b3d04b8
BLAKE2b-256 f007cc6d39068fb84ec3dbc4d5d2975ada3e47b4c4ed1d637d99071ed3ab9f6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page