Difference between revisions of "Git -C"

From wikieduonline
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 13: Line 13:
  
 
== Related ==
 
== Related ==
* [[git pull]]
+
* <code>[[git pull]]</code>
 +
* <code>[[git fetch]]</code>
  
 
== See also ==
 
== See also ==
 
* {{git pull}}
 
* {{git pull}}
 
* {{git fetch}}
 
* {{git fetch}}
 +
* {{git -C}}
  
 
[[Category:Git]]
 
[[Category:Git]]

Latest revision as of 12:47, 22 October 2024

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


git fetch -C /path/to/git/folder

Related[edit]

See also[edit]

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