Metadata-Version: 2.1
Name: igit
Version: 2020.11.14
Summary: Interactive git and more
Home-page: https://github.com/kobibarhanin/igit
Author: kobi
Author-email: 
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: astroid (==2.4.2)
Requires-Dist: attrs (==20.2.0)
Requires-Dist: blessed (==1.17.6)
Requires-Dist: certifi (==2020.6.20)
Requires-Dist: chardet (==3.0.4)
Requires-Dist: click (==7.1.2)
Requires-Dist: click-help-colors (==0.8)
Requires-Dist: gitdb (==4.0.5)
Requires-Dist: gitignore-parser (==0.0.8)
Requires-Dist: GitPython (==3.1.9)
Requires-Dist: idna (==2.10)
Requires-Dist: importlib-metadata (==2.0.0)
Requires-Dist: iniconfig (==1.1.1)
Requires-Dist: inquirer (==2.7.0)
Requires-Dist: invoke (==1.4.1)
Requires-Dist: isort (==5.6.4)
Requires-Dist: lazy-object-proxy (==1.4.3)
Requires-Dist: mccabe (==0.6.1)
Requires-Dist: packaging (==20.4)
Requires-Dist: pathlib2 (==2.3.5)
Requires-Dist: pluggy (==0.13.1)
Requires-Dist: prompt-toolkit (==1.0.14)
Requires-Dist: py (==1.9.0)
Requires-Dist: Pygments (==2.7.1)
Requires-Dist: PyInquirer (==1.0.3)
Requires-Dist: pylint (==2.6.0)
Requires-Dist: pyparsing (==2.4.7)
Requires-Dist: pytest (==6.1.1)
Requires-Dist: python-editor (==1.0.4)
Requires-Dist: readchar (==2.0.1)
Requires-Dist: regex (==2020.10.15)
Requires-Dist: requests (==2.24.0)
Requires-Dist: six (==1.15.0)
Requires-Dist: smmap (==3.0.4)
Requires-Dist: toml (==0.10.1)
Requires-Dist: typed-ast (==1.4.1)
Requires-Dist: urllib3 (==1.25.11)
Requires-Dist: wcwidth (==0.2.5)
Requires-Dist: wrapt (==1.12.1)
Requires-Dist: zipp (==3.3.1)
Requires-Dist: rich (==9.2.0)

[![Build Status](https://travis-ci.com/kobibarhanin/gitenv.svg?branch=master)](https://travis-ci.com/kobibarhanin/igit)
[![PyPI version](https://badge.fury.io/py/igit.svg)](https://badge.fury.io/py/igit)

# 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:
1. Fast commits - add, commit & push, instantly. 
2. Undo changes - cancel changes made to any file.
3. Branch hopping - move between branches, even if you have unstaged changes, without having to stage them.
4. Easy ignore - add files to ignore, sync with remote. 
5. Interactivity - select and check instead of typing.


## Installation

With [pip](https://pip.pypa.io/en/stable/):

```bash
pip install igit
```

## Usage
![help](examples/help.png)

### Fast commits

Push / Commit your code in one command.

#### From:
```bash
git add .
git commit -m "commit message"
git push 
```

#### To:
```bash
igit up "commit message" 
```

![up](examples/up_cmd.png)

#### Or:
You can also go through the whole interactive process:
![up](examples/full_push_cmd.png)

#### 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.

```bash
# 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
```

![undo](examples/undo_cmd.png)

#### 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.

```bash
# 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
```
![branch](examples/branch_cmd.png)

#### Notes:
- When in hopping mode all change are stored to the git stash. 
You can use ```git stash list``` to see stashed changes and ```git stash pop``` to retrieve stashed changes


### git ignore

Add files to ignore, create ignore files from templetes.

```bash
# To add files to .gitignore:
igit ignore
# To create a .gitignore:
igit ignore --create  
```
![ignore](examples/ignore_cmd.png)

#### Notes:
- In case your local .gitignore is not in sync with your remote .gitignore you can use: 
```bash
# Reset .gitignore:
igit ignore --reset 
```
And then push to remote - your current .gitignore will take effect. 

### diff

Select a file to view diff.

```bash
igit diff
```
![diff](examples/diff_cmd.png)


## 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](https://linuxize.com/post/how-to-create-bash-aliases/):
```bash
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
[MIT](https://choosealicense.com/licenses/mit/)


