Code Monkey home page Code Monkey logo

git-watcher's Introduction

Introduction

Git Watcher is a multi-platform desktop app written in pure HTML and Javascript using nw.js (node-webkit).

It shows diff information about local staged/unstaged files and allows you to commit changes. UI is updated in real-time by detecting file changes and git index changes. Submodules also inform changes to their parent module.

It also organizes repository submodules in tabs, so that you can work easily with them without the need of having multiple git gui instances or shells.

In my opinion, the native git gui app is awful and lacks a lot of features. This app aims to outstand it :)

Features

  • Real-time multiple file diff information with line numbers and syntax highlighting
  • Allows you to work with submodules organized in tabs
  • Support for hunk and line staging
  • Allows you to open files by clicking on its name or lines numbers. You can even use your preferred editor!
  • Shows current branch information: upstream branch and ahead/behind commit count
  • Menu bar with shortcuts, configuration options and utilities
  • Shows commit log per module
  • System Tray support
  • Support for custom tools (external commands)

Screenshots (v0.5.5)

Overview 1 Overview 2 Overview 3 Overview 4 Overview 5 Overview 6 Overview 7

Download

Previous versions

Please consider downloading the proper build according to your distribution. See Troubleshooting if you cannot run the app.

Someone please help me to create Windows & Mac binaries!

How to run the app

Just extract file contents and execute ./gitw.

You can also:

  • Create a desktop shortcut :P
  • sudo npm link. A link to the app will be created in /usr/local/bin, so you can run the app using gitw command. If it's a valid Git repository, the current working directory is used by default.

Configuration options

The application stores configuration data as a JSON file in ~./config/gitw/config.json. Certain config values can be modified using the app options menu. Until the UI provides a complete way of customizing these values, you can edit the file yourself.

Current config file structure EXAMPLE:

{
	"defaultRepository": "~/www/myproject",    // default git repository to load on startup
	"debugMode": false,    // enable debugging
	"diff": {
		"defaultMaxFiles": 6,		// maximum number of files to display by default (too many files may slow down application)
		"contextLines": 4,
		"ignoreEolWhitespace": true,
		"highlight": {
			"enabled": true,
			"byFileExtension": {    // enable/disable syntax highlighting by file extension
				".js": true,
				".php": true
			}
		}
	},
	"uiOptions": {
		"showCommitLog": true		// Show last 10 commits for each module
	},
	"external": {    // custom commands
		"fileOpener": {    // handle file opening, empty path uses system default application
			"path": "/usr/local/netbeans-8/bin/netbeans",
			"args": ["--open", "$FILE:$LINE"]    // $FILE is replaced by the file path. $LINE is replaced by line number (if available)
		},
		"directoryOpener": {    // handle directory opening, empty path uses system default application
			"path": "",
			"args": []
		}
	},
	"tools": [	// custom tools to be included in the menu bar under the "Tools" menu
		{
			"name": "My custom command",
			"cmd": "/path/to/script.sh",
			"args": []
		}
	],
	"shortcuts": {	// customize shortcuts, you can combine the following modifiers with a letter: cmd, shift, ctrl, alt
		"repositoryOpen": "ctrl+shift o",
		"repositoryClose": "ctrl+shift c",
		"repositorySubmoduleUpdate": "ctrl+shift u",
		"repositorySubmoduleUpdateRecursive": "ctrl+shift r",
		"repositoryExplore": "ctrl+shift e",
		"repositoryBrowse": "ctrl+shift k",
		"repositoryRefresh": "F5",	// F1-F11 keys are allowed. F12 is reserved for devtools
		"repositoryQuit": "ctrl q",
		"branchCreate": "ctrl n",
		"branchCheckout": "ctrl o",
		"branchDelete": "ctrl d",
		"commitAmend": "ctrl BackSpace",
		"commitStageAll": "ctrl t",
		"commitUnstageAll": "ctrl u",
		"stashSave": "ctrl s",
		"stashPop": "ctrl p"
	}
}

TODO

I'm working on the following features (your help will be much appreciated!)

  • Rename branches
  • Keyboard navigation between files
  • Delete, edit and add remotes
  • More configuration options
  • Better syntax highlighting
  • Hooks: allow to add external commands to interact with branches or files.

Create your own build

Please read node-webkit wiki for details on how to run apps.

Requirements:

Then:

  • Clone repo and run npm install or just run npm install gitw.
  • Install nw-gyp: npm install -g nw-gyp.
  • Rebuild git-utils dependency based on the node-webkit version you are running. Eg: cd node_modules/git-utils && nw-gyp rebuild --target=0.12.0.
  • Run the app! /opt/node-webkit/nw /path/to/gitw.

Also, you will find two helper scripts: build.sh and build-new.sh (deprecated). Those creates distributable packages for Linux. It asumes you have node-webkit installed on /opt/node-webkit.

Troubleshooting

  • The solution of lacking libudev.so.0
  • ENOSPC error: You may run into that error when browsing large repositories. You need to increase the maximum number of watches for inotify: echo fs.inotify.max_user_watches=65536 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p. That should be enough.

git-watcher's People

Contributors

demian85 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

git-watcher's Issues

Request for ARCH

Hi,

Can you please create a git-watcher AUR for "v0.5.2" ?, if not, do you mind if I'll do it ?

Thanks :)

Can't Load Git Repos after clone down.

Hi,
I did a fresh clone down and now when i build or run with
./build.sh or ./build-new.sh
/opt/node-webkit/nw '/home/al/github/git-watcher/
It loads up find, the options bar isn't in the top bar
selection_003

#Improvment Idea for "commit"

So,
Now that I have the latest version (I got pull also, thanks for that), I changed my code, added to staggered, committed, and pushed.
What I find un-intuative , is that when I press "commit" the changes disappear (which is only logical as now I told the repo that this IS the current code), but, because I work against a remote repository, it isn't the current code, is there an option that when working against remote repositories (or by configurations) the changes will disappear only after a "push" ?

Push does not allow to choose a repository

Hello,

I've got multiple remote branch, and the GUI does not offer a selection for them. I don't want to define a default one, because I use a different branch according to where I work with my computer.

Thanks.

Here is the message (French language inside):

Error: Command failed: git push

warning: push.default n'est pas défini ; sa valeur implicite a changé dans Git 2.0
de 'matching' vers 'simple'. Pour supprimer ce message et maintenir
le comportement actuel après la modification de la valeur de défaut, utilisez :

  git config --global push.default matching

Pour supprimer ce message et adopter le nouveau comportement maintenant, utilisez :

  git config --global push.default simple

Quand push.default vaudra 'matching', git poussera les branches locales
sur les branches distantes qui existent déjà avec le même nom.

Depuis Git 2.0, Git utilise par défaut le comportement plus conservatif 'simple'
qui ne pousse la branche courante que vers la branche distante correspondante
que 'git pull' utilise pour mettre à jour la branche courante.

Voir 'git help config' et chercher 'push.default' pour plus d'information.
(le mode 'simple' a été introduit dans Git 1.7.11. Utilisez le mode similaire
'current' au lieu de 'simple' si vous utilisez de temps en temps d'anciennes versions de Git)

ssh: connect to host XXX.XXX.XXX.XXX port 22: Connection timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Running Without the SUID Sandbox

Hey, I cloned down the latest revision of the repo but i get this error.

[6136:0109/082451:ERROR:browser_main_loop.cc(162)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.

This causes chromium to display this

Invalid package 

There is no 'package.json' in the package, please make sure the 'package.json' is in the root of the package.

Do i need to enable chromium sandbox? or should node-webkit do that automatically?

Need help to continue supporting this app

This project has been "frozen" since weeks ago, since I've been busy working on other things.

I would like to continue improving this app, but I don't know how to implement new features without using a native Git API for Node, and all of them have very poor documentation.

You are welcome to help me with any tip!

Git Pull

Hi,

First all this is a great app ! running on Arch and loving it (I wish someone will create an AUR package for it).

I wonder what about adding the Pull function to the GUI ? for now I only see Push and commit.

Need help on how to implement amend commit

That basic feature is killing me, since I can't find a way to obtain file diffs from HEAD^ without modifying the current git repository state outside the app.
Somehow I need a "sandbox".

Help? :)

Add Windows & OSX Builds

Node-Webkit supports these platforms just fine and it would be awesome if you could link to precompiled binaries of git-watcher.

Also, when you make releases on GitHub, you can attach files with them. This way precompiled downloads for every platform can be hosted on GitHub and tagged with each release.

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.