ShortGit provides dg, a small, trust-aware front-end around real Git. It turns repository shorthand into a complete clone command without replacing Git or storing credentials.
dg clone shortgit
-> git clone -c core.hooksPath=.githooks git@github.com:<default-owner>/shortgit.git
Go 1.26 or newer is required.
go install github.com/dominicnunez/shortgit/cmd/dg@latestFor a local checkout:
go install ./cmd/dgdg delegates authentication to Git, SSH, Git Credential Manager, or GitHub CLI. It never asks for or stores a GitHub token.
Set the owner used for unqualified repository names:
dg config set github.default_owner dominicnunez
dg config set github.protocol ssh
dg config showBy default, configuration is stored in the operating system's user config directory under shortgit/config.json. Set DG_CONFIG to use a different file, which is useful for portable installations and tests.
Available settings:
github.host
github.default_owner
github.protocol ssh or https
workspace.root
workspace.use_owner_subdirectories true or false
hooks.path
hooks.enable_for_default_owner true or false
hooks.trusted_owners comma-separated owners
bootstrap.enabled true or false
dg clone shortgit
dg clone shortgit.git
dg clone openai/openai-go
dg clone https://github.com/foo/bar.gitOptions can override the configured host, owner, protocol, destination, or hook decision:
dg clone repo --owner another-owner
dg clone repo --https --dir ~/Code/repo
dg clone external/repo --hooks
dg clone repo --no-hooks
dg clone repo --dry-runPass native git clone arguments after --. They remain separate process arguments and are never joined into a shell command:
dg clone openai/openai-go -- --depth 1 --branch mainShortGit can activate a repository's tracked .githooks during clone by passing -c core.hooksPath=.githooks to real Git.
- Repositories on the configured host under the default owner enable hooks automatically.
- Owners listed in
hooks.trusted_ownersenable hooks automatically. - Unknown owners and hosts leave hooks disabled.
--hooksexplicitly trusts hooks for that clone.--no-hooksalways disables them.
Repository-local controls:
dg hooks status
dg hooks enable
dg hooks disabledg doctor
dg repo statusdoctor checks configuration, real Git, the selected authentication transport, and the workspace without printing secrets. repo status reports the current remote, parsed owner/repository, project type, and tracked hook state. It does not replace git status.
ShortGit intentionally does not implement Git, shadow the git executable, manage credentials, create GitHub repositories, wrap commit/status commands, run arbitrary bootstrap scripts, or provide a plugin system.