Quite a lot of extras for git. git-release, git-ignore, git-setup, git-changelog, git-effort, and more.
git
Go to file
Vijay Misal dbf68bac59
fix(is-git-repo): recognize bare repositories (#1266)
* fix(is-git-repo): recognize bare repositories

is_git_repo() used `git rev-parse --show-toplevel` to detect whether
the current directory is inside a git repository. --show-toplevel
fails for bare repositories since they have no working tree, so every
command that relies on this shared helper (e.g. `git browse`) reports
"Not a git repo!" when run from inside a bare repo, even though it
plainly is one.

Switch to `git rev-parse --git-dir`, which succeeds for both normal
and bare repositories and keeps the existing "not a repo" behavior
for non-repo directories.

Fixes #1238, reported and LGTM'd by maintainers there with this exact
fix; no PR had been opened for it yet.

Adds tests/is-git-repo.bats covering: a normal repo, a bare repo, and
a plain (non-repo) directory.

* Fix ruff lint failures in scripts/checkstyle.py

This PR's new Ruff CI job surfaced pre-existing style issues (unsorted
imports, deprecated typing.List/Dict, nested ifs, bare exit()) in
checkstyle.py. Cleaned these up so the newly added lint job passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 14:15:48 +08:00
.github port python tests to bats (#1264) 2026-08-12 15:43:59 +08:00
bin feat(scp): add verbose, interactive, and dry-run flags (#1261) 2026-07-14 19:43:00 +08:00
etc Added edit/remove functionality to git-ignore (#1258) 2026-07-14 19:42:02 +08:00
helper fix(is-git-repo): recognize bare repositories (#1266) 2026-08-17 14:15:48 +08:00
man feat(scp): add verbose, interactive, and dry-run flags (#1261) 2026-07-14 19:43:00 +08:00
scripts fix(is-git-repo): recognize bare repositories (#1266) 2026-08-17 14:15:48 +08:00
tests fix(is-git-repo): recognize bare repositories (#1266) 2026-08-17 14:15:48 +08:00
vendor Implement half of tests in Bats (#1187) 2025-03-12 18:15:37 +08:00
.editorconfig Implement half of tests in Bats (#1187) 2025-03-12 18:15:37 +08:00
.gitignore Mostly finish pytest to Bats conversion (#1200) 2025-03-26 11:19:30 +08:00
.gitmodules Implement half of tests in Bats (#1187) 2025-03-12 18:15:37 +08:00
.pytest.ini test(git-authors): add unit test (#1098) 2023-11-18 10:20:19 +08:00
AUTHORS Version 7.5.0 (#1250) 2026-05-10 10:19:14 +08:00
brew-release.patch change installation source from master to main (#1092) 2023-10-23 12:13:40 +08:00
check_dependencies.sh updates per request of spacewander 2022-05-05 11:19:30 -04:00
check_integrity.sh Update some documentation that was out of sync (#1164) 2024-09-22 14:11:31 +08:00
Commands.md feat(scp): add verbose, interactive, and dry-run flags (#1261) 2026-07-14 19:43:00 +08:00
CONTRIBUTING.md Use filetimes in check_integrity (#1162) 2024-09-19 11:27:11 +08:00
History.md Version 7.5.0 (#1250) 2026-05-10 10:19:14 +08:00
install.cmd fix: support Windows ARM64 (clangarm64) in install.cmd (#1259) 2026-07-08 15:20:25 +08:00
install.sh Switch from using /tmp to using mktemp 2019-09-05 12:41:45 +08:00
Installation.md Use standard prefix for home dir installs (#1248) 2026-04-29 13:46:32 -07:00
LICENSE Mention initial copyright year and add contributors to copyright 2016-01-30 17:30:04 +05:30
Makefile port python tests to bats (#1264) 2026-08-12 15:43:59 +08:00
need_git_commit git-back: removed 2020-08-28 22:23:41 +08:00
not_need_git_repo feat: Implement git-get command (#1045) 2023-08-12 13:49:33 +08:00
Readme.md Overhaul CONTRIBUTING document (#1103) 2023-11-11 12:50:50 +08:00

Git Extras

Little git extras.

Screencasts

Just getting started? Check out these screencasts:

Installation

See the Installation page.

Commands

Go to the Commands page for basic usage and examples.

GIT utilities -- repo summary, repl, changelog population, author commit percentages and more

Contributing

Interested in contributing? Awesome!

Please read Contributing before you make a PR, thanks!

The change of the default branch

As of Git Extras 6.4 the assumed default branch name changed from master to main. This affects the Git Extras commands git archive-file, git delete-merged-branches, git delta, git pull-request, git show-merged-branches, git show-unmerged-branches, and git squash.

To change the default branch name to master: change either the configuration git-extras.default-branch or init.defaultBranch to master; the former takes precedence.

For example, git config git-extras.default-branch master.