Execute a Git subcommand on a custom repository root path

git

  • Distributed version control system.
    Some subcommands such as `commit`, `add`, `branch`, `checkout`, `push`, etc. have their own usage documentation, accessible via `tldr git subcommand`.
    More information: <https://git-scm.com/>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

git -C {{path/to/repo}} {{subcommand}}

click the source code to copy install git on any operating system with command-not-found.com