TExcelTAD
Home › Git › Git GUI Clients

Git GUI Clients

You don't have to use Git from the terminal. Graphical clients show the history as a picture, let you stage individual lines with a click and make conflicts easier to see. Under the hood they all run the same Git commands you've been learning, so knowing the command line makes any GUI easier to understand (and lets you fix things when the GUI can't).

Popular clients

Client Platforms Notes
VS Code (built-in Source Control) Windows, macOS, Linux stage/commit/push from the editor; merge-conflict editor; extensions like GitLens
JetBrains IDEs (IntelliJ, PyCharm, WebStorm…) all strong log, diff, merge and interactive rebase tools
GitHub Desktop Windows, macOS simple, tied to GitHub accounts, good for beginners
GitKraken all colourful graph, built-in merge tool (free for public repos)
Sourcetree Windows, macOS free, full-featured
Fork, Tower Windows, macOS fast commercial clients
gitk, git gui ships with Git basic history browser and commit tool
lazygit, tig terminal text-based UIs for the terminal

What a GUI shows you, in commands

The "graph" view of every client is the same information as this command:

bash · try it yourself
mkdir app && cd app && git init -q
echo "v1" > app.txt && git add . && git commit -q -m "Initial commit"
git switch -q -c feature/login
echo "login" > login.txt && git add . && git commit -q -m "Add login page"
git switch -q main
echo "v2" > app.txt && git commit -q -am "Update app"
git merge -q feature/login -m "Merge feature/login"
git tag v1.0
git log --graph --all --format='%h %d %s (%an)'
*   28ac758  (HEAD -> main, tag: v1.0) Merge feature/login (Ada Lovelace)
|\
| * aec577e  (feature/login) Add login page (Ada Lovelace)
* | b8c7a2e  Update app (Ada Lovelace)
|/
* ed01b6b  Initial commit (Ada Lovelace)

How clients read your repository

GUIs don't parse the friendly git status text. They call commands with porcelain output formats that are guaranteed to stay stable between Git versions:

bash · try it yourself
git init -q --bare ~/remote.git
mkdir app && cd app && git init -q
echo "v1" > app.txt && echo "old" > notes.txt && git add . && git commit -q -m "Initial commit"
git remote add origin ~/remote.git && git push -q -u origin main
echo "v2" > app.txt
git add app.txt
rm notes.txt
echo "draft" > ideas.txt
git status --porcelain=v1 --branch
echo "---"
git status --porcelain=v2 --branch | cut -c1-60
## main...origin/main
M  app.txt
 D notes.txt
?? ideas.txt
---
# branch.oid 2e98972e26721cc9c91d9c222988035890daac5a
# branch.head main
# branch.upstream origin/main
# branch.ab +0 -0
1 M. N... 100644 100644 100644 626799f0f85326a8c1fc522db584e
1 .D N... 100644 100644 000000 3367afdbbf91e638efe983616377c
? ideas.txt

Version 2 adds machine-readable details such as the upstream's ahead/behind counts (# branch.ab +0 -0), file modes and object IDs, which is how a client can show "↑0 ↓0" next to the branch name.

Staging lines instead of whole files

The most-loved GUI feature is clicking individual lines to stage them. On the command line the same thing is git add -p (interactive, in your own terminal), and behind the scenes a GUI builds a patch and applies it to the index:

bash · try it yourself
mkdir app && cd app && git init -q
printf 'one\ntwo\nthree\nfour\nfive\nsix\nseven\neight\n' > list.txt
git add . && git commit -q -m "Add list"
sed -i 's/^one$/ONE/; s/^eight$/EIGHT/' list.txt
git diff -U0 > all.patch
# keep only the first hunk, as a GUI would when you stage one change
awk '/^@@/{n++} n<2' all.patch > first-hunk.patch
git apply --cached -v --unidiff-zero first-hunk.patch
git diff --staged -U0 | tail -2
echo "--- still unstaged:"
git diff -U0 | tail -2
Checking patch list.txt...
Applied patch list.txt cleanly.
-one
+ONE
--- still unstaged:
-eight
+EIGHT

Choosing a client

  • Learning? Stay mostly in the terminal so you understand each step, and use a GUI to look at history.
  • Daily work? Your editor's integration (VS Code, JetBrains) covers 90% of tasks.
  • Big merges or rebases? A dedicated tool with a three-pane merge view helps a lot.

Tip: Set your favourite diff/merge tool with git config --global merge.tool vscode (plus mergetool.vscode.cmd), then run git mergetool during a conflict.

Test yourself

What does a Git GUI client do internally?

  1. Uses its own version control format
  2. Runs Git commands (often with porcelain output formats) on your repository
  3. Uploads the repository to the cloud
  4. Converts Git to SVN

Which command-line feature corresponds to staging single lines in a GUI?

  1. git add -A
  2. git add -p
  3. git commit -a
  4. git stash