Difference between revisions of "Git -C"
Jump to navigation
Jump to search
↑ https://stackoverflow.com/a/33557279
(3 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
* Pull subdirectories: | * Pull subdirectories: | ||
::<code>ls | [[parallel]] git -C {} [[git pull|pull]]</code> (assuming all sub-dirs are git repositories) <ref>https://stackoverflow.com/a/33557279</ref> | ::<code>ls | [[parallel]] git -C {} [[git pull|pull]]</code> (assuming all sub-dirs are git repositories) <ref>https://stackoverflow.com/a/33557279</ref> | ||
− | ::<code>ls | parallel git -C {} fetch</code> | + | ::<code>ls | parallel git -C {} [[git fetch|fetch]]</code> |
− | :: <code>-C <PATH></code> run as if git was started in <path> instead of the current working directory | + | :: <code>-C <PATH></code> run as if git was started in <path> instead of the current working directory |
+ | |||
− | |||
− | |||
+ | git fetch -C /path/to/git/folder | ||
+ | == Related == | ||
+ | * <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:
git fetch -C /path/to/git/folder
Related[edit]
See also[edit]
git pull
[-v | -a
]git request-pull
,git pull origin master
Pull Request (PR),--no-rebase, --rebase
git fetch, --all
,git auto-fetch
,git -C
git -C
Advertising: