Skip to main content

Bundle a local Git project with all uncommitted changes and stashes (git bundle on steroids).

Project description

Git Bundle Plus

Bundle a local git project with all uncommitted changes, unstaged files, and stashes (git bundle on steroids).

Contents

Requirements ✅

  • Python 3

Installation 🔌

Using pip

Use the package manager pip to install Git-Bundle-Plus.

pip install git-bundle-plus

Clone + Python 3

git clone https://github.com/an23lm/GitBundlePlus.git
python ./gitbundleplus [-h] path

Usage 👩‍💻

gitbundleplus [-h] path

-h : Help

path : Path to local git project folder you would like to bundle

⚠️ Note: After using gitbundleplus on a project the uncommitted and unstaged files will be statshed. You can easily retrieve these files by using git stash apply and drop the applied stash with git stash drop if you have no further need for it.

Example 👶

Bundle project

gitbundleplus ~/Documents/mygitproject

Unbundle project

git clone ~/Documents/mygitproject.bundle

Retrieve uncommited and unstanged changes

git stash apply ga-stash-tag-{ga-latest}

.bundle output + retrive git project 📦

<git-folder-name>.bundle will be created in the git folder specified.

To unbundle the bundled git project, clone the bundle.

git clone path/to/bundle

Restore the unstaged and uncommitted changes.

All the unstaged and uncommitted changes are stashed (git stash) and tagged (git tag) before bundling.

git stash apply ga-stash-tag-{ga-latest}

Delete the tag to drop the stash after your done applying.

git tag -d <tag-name>

Find and apply your previously stashed changes.

git tag list to view all your previously stashed changes, tagged with the pattern ga-stash-tag-{<stash-number>}. Apply and drop these tagged stashes as per your requirements.

git stash apply <tag-name>

Delete the tag to drop the stash after your done applying.

git tag -d <tag-name>
⚠️ Note: Unbundled projects do not checkout to your current working branch. They default to master branch. Please, take care to use git checkout <branch-name> to start using a particular branch before applying stashed changes.

Please read How it works for more information.

How it works ⚙️

  1. git stash list is run and all the previously stashed items are tagged with the pattern ga-stash-tag-{<stash-number>}. Example: git tag ga-stash-tag-{0} stash@{0}.
  2. Stash uncommited and unstaged changed using git stash -u. If a stash is created, this stash will be assigned the tag ga-stash-tag-{ga-latest}.
  3. Bundle the git project using git bundle <git-folder-name>.bundle and the bundle is placed in the git folder.
  4. All the tags from the original git project will be removed. Example: git tag -d ga-stash-tag-{0}.

Show some love ❤️

If you found this interesting or helpful, leave a star. ⭐️

Contributers 👨‍👩‍👧‍👦

Contribute 💪

Pull requests are welcome.

License 📃

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Git_Bundle_Plus-0.9.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file Git_Bundle_Plus-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: Git_Bundle_Plus-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.7.2

File hashes

Hashes for Git_Bundle_Plus-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d8eb263af8c9c1b20ed823e3a8617196d3e112cb323d68474d8a596685c0fa49
MD5 d63683dabaf3cf35e521062337d863c9
BLAKE2b-256 6d3d782d5b7653e1868d166dc8813cd8153f0c1c9f94c6915c7af7196eddd682

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