commit/branch/workdir explorer for git
Branch: master
Clone or download
isacikgoz add fuzzy search and file checkout (#43)
* keep search mode and search string after return to log prompt

* bump version

* add patch shortcut to status and add gitignore file

* update readme and add features list

* update readme and add features list

* update readme

* add travis file and implement file reset for gitin status

* update travis file

* add badges to readme

* remove licence badge

* add fuzzy find feature

* find method is now configurable

* add start in search mode feature

* performance improvement on fuzzy search

* bugfix when there is no entries after file checkout

* add show stat option at log->stat prompt
Latest commit 0b001df Feb 13, 2019

README.md

gitin

gitin is a commit/branch/status explorer for git

gitin is a minimalist tool that lets you explore a git repository from the command line. You can search from commits, inspect individual files and changes in the commits. It is an alternative and interactive way to explore the commit history. Also, you can explore your current state by investigating diffs, stage your changes and commit them.

screencast

Features

  • Fuzzy search (type / to start a search after running gitin <command>)
  • Various filters for commit history (e.g. gitin log --author="...")
  • See ahead/behind commits (e.g. gitin log --ahead)
  • Interactive stage and see the diff of files (gitin status then press enter to see diff or space to stage)
  • Commit/amend changes (gitin status then press c to commit or m to amend)
  • Interactive hunk staging (gitin status then press p)
  • Explore branches with useful filter options (e.g. gitin branch press enter to checkout)
  • Convenient UX and minimalist design
  • See more options by running gitin --help, also you can get help for individual subcommands (e.g. gitin log --help)

Installation

  • Linux and macOS are supported, haven't tried on Windows.
  • Download latest release from here
  • Or, manually download it with go get -d github.com/isacikgoz/gitin
  • cd into $GOPATH/src/github.com/isacikgoz/gitin
  • build with make install (cmake and pkg-config are required)

Mac using brew

brew tap isacikgoz/gitin
brew install gitin

Usage

usage: gitin [<flags>] <command> [<args> ...]

Flags:
  -h, --help     Show context-sensitive help (also try --help-long and --help-man).
  -v, --version  Show application version.

Commands:
  help [<command>...]
    Show help.

  branch [<flags>]
    Checkout, list, or delete branches.

  log [<flags>]
    Show commit logs.

  status
    Show working-tree status. Also, stage and commit changes.

Configure

  • To set the line size export GITIN_LINESIZE=5
  • To hide help export GITIN_HIDEHELP=true
  • To set find method GITIN_SEARCHMODE=<method> (fuzzy, basic or combined)

Development Requirements

  • Requires gitlib2 v27 and git2go. See the project homepages for more information about build instructions. For gitin you can simply;
    • macOS:
      1. install libgit2 via brew install libgit2 (consider that libgit2.v27 is required)
    • Linux and macOS(if you want to build your own):
      1. download git2go; go get -d gopkg.in/libgit2/git2go.v27
      2. make sure you have cmake, pkg-config and libssl-dev installed
      3. cd into $GOPATH/src/gopkg.in/libgit2/git2go.v27
      4. initialize submodules by running git submodule update --init
      5. change the libigt2 version to your version (in this case its 0.27) in the install script (e.g. nano script/install-libgit2.sh or vim script/install-libgit2.sh) and change LG2VER to 0.27.0
      6. run the script ./script/install-libgit2.sh
  • After these you can download it with go get github.com/isacikgoz/gitin
  • cd into $GOPATH/src/github.com/isacikgoz/gitin and start hacking

Contribution

  • Contributions are welcome. If you like to please refer to Contribution Guidelines
  • Bug reports should include descriptive steps to reproduce so that maintainers can easily understand the actual problem
  • Feature requests are welcome, ask for anything that seems appropriate

Credits

See the credits page

License

BSD-3-Clause