Skip to content

alberthier/git-webui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git WebUI

This git extension is a standalone web based user interface for git repositories.

It comes with history and tree browsing. You may also use it to commit as it comes with an UI to review local changes and the ability to stage / unstage code.

Moreover as git-webui is a web server, your repository is accessible to other people on the same network. They can clone or pull your code using the same URL.

It has very few dependencies, you probably already have them on your Mac / Linux : git, python, and a web browser.

Installation

Automatic (Do you trust me ?)

The following command will install git-webui in $HOME/.git-webui and add a webui alias to your global .gitconfig file.

Note for Windows users: These install scripts work for you too. Run them from your Git-Bash shell. You need to install Python first.

Using curl (Mac OS X & Windows):

curl https://raw.githubusercontent.com/alberthier/git-webui/master/install/installer.sh | bash

Using wget (Linux):

wget -O - https://raw.githubusercontent.com/alberthier/git-webui/master/install/installer.sh | bash

Upon installation git-webui will update itself automatically every couple of weeks. You can deactivate auto-update by removing the autoupdate = true line from the webui section of your global .gitconfig file.

Manual

Simply clone the repository and install the alias

git clone https://github.com/alberthier/git-webui.git
git config --global alias.webui \!$PWD/git-webui/release/libexec/git-core/git-webui

If you want to allow auto-update:

git config --global webui.autoupdate true

Usage

Starting

First cd to any of your project versioned with git

cd <my-local-git-clone>
git webui

This will start an embedded HTTP server and open your default browser with the GUI.

History Viewing

The toolbar on the left shows your branches and tags. The log of the currently selected one is displayed.

When selecting a revision the diff of this specific commit is displayed in the right panel.

Image of log commit

On top of the right panel, you can choose 'Tree' to display the versioned content at the specific revision selected in the left panel. You can browse through directories and display file contents.

Image of log tree

Remote access

Other people on your network have read-only access to your repository: they may access to the web interface (without 'Workspace'), clone or pull from your repository. All this through the same url:

Clone:

$ git clone http://<ip_of_the_computer_running_webui>:8000/ repo_name

Pull:

$ git pull http://<ip_of_the_computer_running_webui>:8000/

Commit

Commits can only be made from localhost.

Image of the workspace

  • Working copy lists the modified files (compared to the staging area) in your working directory
  • Message lets you enter a commit message
  • Staging area lists the modified files (compared to HEAD) in your staging area. These are the changes that will be committed

The diff view lets you review the differences of the selected file. You can select code in more fine grained way:

  • If the displayed diff is from the working copy, you may stage or cancel the selected lines.
  • If the displayed diff is from the staging area, you may unstage the selected lines.

Dependencies

Runtime

  • git (of course :) )
  • python 2.7+ or python 3.0+ (Generally already installed on your Mac / Linux)
  • An up-to-date modern browser

Development

  • Runtime dependencies and ...
  • node.js
  • grunt-cli

Uninstallation

Automatic

Using curl (Mac OS X & Windows):

curl https://raw.githubusercontent.com/alberthier/git-webui/master/install/uninstaller.sh | bash

Using wget (Linux):

wget -O - https://raw.githubusercontent.com/alberthier/git-webui/master/install/uninstaller.sh | bash

Manual

rm -rf <git-webui-clone-path>
git config --global --unset-all alias.webui
git config --global --remove-section webui

Contributing

You can clone the source code of git-webui on GitHub

After executing grunt git-webui is available in the dist folder.

Please don't commit any content to the release folder. This is for end-users release versions, not for work-in-progress versions

Packaging

If you want to build a DEB, RPM or Homebrew package for git-webui, you only need the content of the release folder.

Installing git-webui globally on the system is nothing else than

cp -rf release/* /usr

Limitations

  • If you have no web browser installed at all (headless server), you should start git webui with the --no-browser option. Otherwise git-webui may freeze searching for a browser.

Author

Éric ALBER (@eric_alber)

License

This software is licensed under the Apache 2.0 license