git -C

From wikieduonline
Revision as of 08:55, 16 August 2024 by Welcome (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

git -C <path> run as if git was started in <path> instead of the current working directory.
  • Pull subdirectories:
ls | parallel git -C {} pull (assuming all sub-dirs are git repositories) [1]
ls | parallel git -C {} fetch
-C <PATH> run as if git was started in <path> instead of the current working directory.

Related[edit]


See also[edit]

  • https://stackoverflow.com/a/33557279
  • Advertising: