Interactive git and more
Project description
Igit - Interactive Git
TL;DR:
Igit is an interactive supplementary CLI to git for better git experience.
The Story:
For a long time I've been using a variety of aliases for git commands, some of which were custom and aimed to boosting my git productivity - so I've decided to package it into a product for others to use.
Main features:
- Fast commits - add, commit & push, instantly.
- Undo changes - cancel changes made to any file.
- Branch hopping - move between branches, even if you have unstaged changes, without having to stage them.
- Easy ignore - add files to ignore, sync with remote.
- Interactivity - select and check instead of typing.
Installation
With pip:
pip install igit
Usage
Fast commits
Push / Commit your code in one command.
From:
git add .
git commit -m "commit message"
git push
To:
igit up "commit message"
Or:
You can also go through the whole interactive process:
Notes:
- If you don't specify a commit message it will default to 'fast commit'.
- Same goes for
igit save
- without pushing to remote.
Undo changes
Undo changes (unstaged) in a file or in all files.
# To undo changes in an unstaged changed file:
igit undo file_1.py
# To pick a file just drop the file's name:
igit undo
# undo all changes
igit undo -all
Notes:
- Same goes for
igit unstage
with respect to added files.
Branch hopping
Move easily between local branches, enable hopping to move seamlessly even in case of unstaged changes.
# To change branches:
igit branch
# To change branches with unstaged changes:
igit branch --hopping_on
# Create a new branch and change into it:
igit branch --create
Notes:
- When in hopping mode all change are stored to the git stash.
You can use
git stash list
to see stashed changes andgit stash pop
to retrieve stashed changes
git ignore
Add files to ignore, create ignore files from templetes.
# To add files to .gitignore:
igit ignore
# To create a .gitignore:
igit ignore --create
Notes:
- In case your local .gitignore is not in sync with your remote .gitignore you can use:
# Reset .gitignore:
igit ignore --reset
And then push to remote - your current .gitignore will take effect.
diff
Select a file to view diff.
igit diff
Compatibility
igit is cross-platform → Windows, macOS, Linux
🤓 windows users will get best experience with windows terminal.
Built with
- click
- gitpython
- inquirer
- rich
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.
Local dev environment (macOS / Linux)
- Clone this project
- cd into project directory
- Run: pipenv install
- Run: pipenv --venv
- Add bash alias:
alias igit='PYTHONPATH=<LOCAL GITSY PROJECT DIR> <PIPENV VENV PATH>/bin/python3 <LOCAL IGIT PROJECT DIR>/igit/cli.py'
- Now you can run igit from bash and code changes in local igit dir will apply.
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
File details
Details for the file igit-2020.11.14.tar.gz
.
File metadata
- Download URL: igit-2020.11.14.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fa9b5ff5a6cdaa6424ce9ee6c84a4602374bafcfc5ccfb170a92f51ef3fb372 |
|
MD5 | 95e85b932d03a639d0cd33772950e37b |
|
BLAKE2b-256 | 9c8026ea86ca666771e0097a323a054d22ffeba95c09eb3f5760a2637e34af2f |
File details
Details for the file igit-2020.11.14-py3-none-any.whl
.
File metadata
- Download URL: igit-2020.11.14-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d09eed62b53acec7d939b217a0351d2f0dee27c4f514d8774d5ec06adbc0822 |
|
MD5 | e25d71798aad469c24b016a90947ca69 |
|
BLAKE2b-256 | 90e40425b1067ab34d1046e6563c634ace45fc2a708c5a936a4254266c3bbf94 |