git-gui - Linux
Overview
git-gui provides a graphical user interface (GUI) for managing Git repositories. It offers a user-friendly and interactive experience, making it accessible to both novice and advanced users.
Syntax
git-gui [<revision range>] [<paths>...]
Options/Flags
- -h, –help: Display help and usage information.
- -v, –verbose: Enable verbose output.
- -p, –patch: Display diffs as unified patches.
- -s, –stat: Display diffs as a summary of modified lines.
- -L, –follow: Follow file renames during diffing.
- -c, –color: Enable colorization of output.
- -w, –whitespace: Expand tabs and trailing whitespace in diffs.
- –staged: Limt changes to staged files.
- –unmerged: Display unmerged paths and conflicts.
- –untracked: Display untracked files.
Examples
- Inspect changes in the current branch:
git-gui
- View diffs for specific files:
git-gui path1 path2
- Display summary of modified lines only:
git-gui -s
- Follow file renames and use colorized diffs:
git-gui -L -c
Common Issues
- Missing GUI window: Ensure that a GUI environment is installed and running.
- Diffs not showing up-to-date: Refresh the GUI using the "Refresh" button or press
F5
. - Repository corruption: If the repository is corrupted, try using
git fsck
to repair it.
Integration
- Git difftool: Use
git-gui
as the external difftool forgit difftool
. - Git extensions: Integrate with Git extensions to enhance the GUI functionality.
Related Commands
- git: The core Git command-line tool.
- gitk: Another GUI tool for visualizing Git history.
- Git documentation: Official documentation for all Git commands.