A CLI tool for Git. Available as an NPM package.
GitGud is an open-source repository designed to provide beginners and experienced developers with a platform to learn and enhance their Git skills. The repository is built with the aim of providing an interactive learning experience for developers of all skill levels. Whether you're just getting started with Git or looking to improve your existing skills, GitGud provides an extensive set of resources and tools that can help you master Git. GitGud allows you to easily visualize and fully utilize git throughout your projects. It is created using Ink which provides the same component-based UI building experience that React offers, but in a Command Line Interface (CLI).
$ npm install --global gitgud
This will install the package globally
$ GitGud
Navigate to any project that has a git directory in it and run the 'gitgud' command. This will load the gitgud UI to your terminal window
The GitGud UI consists of: Unstaged Changes, Staged Changes, Git Branch tree view and functionality buttons
Navigate through the UI with either the 'tab' button or left/right arrow keys
Press 'enter/return' button to select/click an option
Throughout the app you can hit the 'esc'(escape) button to go back
You can exit the app by running ctrl + c
STAGE/UNSTAGE (all files)
to move all the files between Stage Changes and Unstage Changes.Gitgud allows users to customize both the look and feel of the app by editing the 'stylefile.'
To access the 'stylefile' of a globally installed GitGud, you will first need to find out where NPM is saving your globally installed files. To do so, run the following command:
npm root -g
This will return the location of your globally installed NPM packages.
On Mac you should see something like this: /usr/local/lib/node_modules
On Windows, you may get this: *C:\Users\YOU\AppData\Roaming\npm\node_modules
Navigate to where your global packages are stored, open the gitgud folder, and then open the styleFile in an editor (the command: nano styleFile.js
will open it in most mac/linux systems).
When you open the file it will look like this:
showLogo
:false
, but if you want to have the GitGud logo on top of your GUI you can change this to true
.defaultColor
:accentColor
:gitTreeColor
:appResize
:showFlag
:false
by default.GitGud is a fully open source project and contributions are welcome!
When submitting a pull request, please clearly explain the feature you added or the bug you fixed.
First-time contributors are welcome as well! There are some issues marked with the good first issue
tag. These might be a good place for beginners to start!
Thanks to Joseph Garrone
for giving us the NPM package name.