Giter Club home page Giter Club logo

gitz's Introduction

gitz

Replacement for gitk.

Closes with Ctrl+W, Ctrl+Q, or Esc. Arrow Keys select commits. Tab switches focus between history and commit view.

Installation

# OpenSUSE Dependencies
zypper search --provides python3-gobject-Gdk
sudo zypper install python310-gobject-Gdk
git clone https://github.com/Zren/gitz.git
cd gitz
chmod +x ./gitz.py
sudo cp ./gitz.py /usr/local/bin/gitz

Tips

Open a subdir in gitz

Run

cd ~/kde/src/plasma-workspace
gitz ./applets/digital-clock

or

cd ~/kde/src/plasma-workspace/applets/digital-clock
gitz .

to only list commits from ./applets/digital-clock in the history view, and only the changes to files in that folder in the commit view. There is a "Show full commit" button if you want to read the entire commit.

Bind Ctrl+Shift+K to open gitz in SublimeText

Create ~/.config/sublime-text-3/Packages/User/gitz.py with:

subl ~/.config/sublime-text-3/Packages/User/gitz.py

Then add the following code to run gitz when we call the open_gitz sublime command.

# Based on Terminal.py

import sublime
import sublime_plugin
import os
import sys
import subprocess


class OpenGitzCommand(sublime_plugin.WindowCommand):
	def get_path(self, paths):
		if paths:
			return paths[0]
		# DEV: On ST3, there is always an active view.
		#   Be sure to check that it's a file with a path (not temporary view)
		elif self.window.active_view() and self.window.active_view().file_name():
			return self.window.active_view().file_name()
		elif self.window.folders():
			return self.window.folders()[0]
		else:
			sublime.error_message('Terminal: No place to open terminal to')
			return False

	def run(self, paths=[], parameters=None, terminal=None):
		path = self.get_path(paths)
		if not path:
			return

		if os.path.isfile(path):
			path = os.path.dirname(path)

		subprocess.Popen([
			'gitz'
		], cwd=path)

Then open the Command Palette Ctrl+Shift+P and search for Preferences: Key Bindings. Paste the following shortcut to bind Ctrl+Shift+K to run the open_gitz command.

	, { "keys": ["ctrl+shift+k"], "command": "open_gitz" }

gitz's People

Contributors

luema avatar zren avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

luema msgpo

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.