Go to file
Johannes Sixt 8676efdc43 gitk: condense repetitive code around color buttons into foreach loops
The color selection elements in the Preferences dialog are set up in a
very uniform manner. The code doing that has grown in the past by simply
modifying a copy of a paragraph. Extract the varying parts into a list
and then operate the repeating parts in a foreach loop. This helps a
later change where we want to set up the UI elements in a different way.

Change the UI names "markbgsep" and "selbgsep" to drop the "sep", which
has obviously been left over by accident when "hunksep" was copied.

Change the suffix "but" to "btn", which resonates a bit better when
reading the code.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2026-08-12 09:05:11 +02:00
po Merge branch 'spanish_pr_bis' of github.com:basuradeluis/gitkbis 2026-07-16 10:53:01 +02:00
.gitignore gitk: ignore generated POT file 2026-03-20 09:31:04 +08:00
Makefile gitk: make "make -s" silent 2026-06-23 18:16:06 +02:00
README.md gitk: add README with usage, build, and contribution details 2025-08-28 19:51:31 +02:00
generate-tcl.sh gitk: extract script to build executable 2025-02-20 08:52:07 +01:00
gitk gitk: condense repetitive code around color buttons into foreach loops 2026-08-12 09:05:11 +02:00
meson.build gitk: fix msgfmt being required 2026-02-05 12:54:03 +01:00

README.md

Gitk - The Git Repository Browser

Gitk is a graphical Git repository browser. It displays the commit history of a Git repository as a graph, showing the relationships between commits, branches, and tags.

Usage

To view the history of the current repository:

gitk

To view the history of specific files or directories:

gitk path/to/file
gitk path/to/directory

To view a specific branch or range of commits:

gitk branch-name
gitk v1.0..v2.0

For more usage examples and options, see the gitk manual.

Building

Gitk is a Tcl/Tk application. It requires Tcl/Tk to be installed on your system.

Running directly

Gitk can be run from the source directory without installation:

./gitk

This allows for quick testing of changes.

Installation

To install system-wide, you can use either make or meson:

# Install to default location ($HOME/bin)
make install

# Install to system-wide location
sudo make install prefix=/usr/local

# Install to custom location
make install prefix=/opt/gitk

# Using Meson
meson setup builddir
meson compile -C builddir
meson install -C builddir

Both build systems will handle setting the correct Tcl/Tk interpreter path and installing translation files.

Contributing

Contributions are welcome! The preferred method for submitting patches is via email to the Git mailing list, as this allows for more thorough review and broader community feedback. However, GitHub pull requests are also accepted.

All commits must be signed off (use git commit --signoff) and should have commit messages prefixed with gitk:.

Email Patches

Send patches to git@vger.kernel.org and CC j6t@kdbg.org. See the Git project's patch submission guidelines for detailed instructions on creating and sending patches.

License

Gitk is distributed under the GNU General Public License, either version 2, or (at your option) any later version.