📅 2016-Mar-15 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ git, git gui, gitk ⬩ 📚 Archive
Git-GUI is a rudimentary GUI tool for Git written in Tcl/Tk. It should be available on all platforms where Git is available. It is primarily meant for committing. However, its dinosaur GUI hides quite a few actions that can be very useful.
$ sudo apt install git-gui
$ git gui
By default, it shows the unstaged files in top-left and staged files in bottom-left. When any files in these sections are clicked, their diff is shown in the main window.
To stage a file in the Unstaged Changes section: click the file icon to the left of the file. I know this is totally non-intuitive, but that is how this GUI is designed!
To move all the unstaged files to staged, click the Stage Changed button at the bottom. The same can be achieved from the top menu: Commit -> Stage changed files to commit.
To unstage a staged file that is in the Unstaged Changes section: Click the checkbox icon to the left of the filename.
To commit, type commit message in the bottom box and press Commit button beside it.
To view graphical history log of any branch, go to Repository -> Visualize All Branch History. This uses gitk
to show this info.
All other basic operations are accessible from the top menu. For example, create/checkout/delete of branches and so on.
To browse the directory tree and look inside files of any branch, use the Repository -> Browse branch files option. This is very useful. When you open a file, it is opened in a rudimentary File Viewer.
The information shown in the file viewer is incredibly informative!
You can hover mouse on any line and see its full history (who added it and so on)!
The file viewer also has rudimentary features to find text and other operations. Right-click anywhere to view these.
To view graphical log of just this file, right-click and choose Show History Context.