Giter Club home page Giter Club logo

igit's Introduction

Build Status PyPI version

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:

pip install igit

Usage

help

Fast commits

Push / Commit your code in one command.

From:

git add .
git commit -m "commit message"
git push 

To:

igit up "commit message" 

up

Or:

You can also go through the whole interactive process: up

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

undo

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

branch

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.

# To add files to .gitignore:
igit ignore
# To create a .gitignore:
igit ignore --create  

ignore

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

diff

Compatibility

igit is cross-platform โ†’ Windows, macOS, Linux

๐Ÿค“ windows users will get best experience with windows terminal - powershell session.

Built with

  • click
  • gitpython
  • inquirer
  • emoji

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

MIT

igit's People

Contributors

kobibarhanin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.