Git Commands from outside the repository
taijidude

taijidude @taijidude

About: Java Developer. Love to read and learn. Hobbies: - tabletop rpgs - boardgames - videogames - cooking - kettlebell

Location:
Hannover, Germany
Joined:
Jul 22, 2020

Git Commands from outside the repository

Publish Date: Jan 28 '21
6 0

This week i discovered something nice and really obvious if you think about it for a minute. But it never really dawned on me till now.

With the parameter -C you can pass git the directory it's supposed to work on. This is great if you use git scripts a lot. No more navigation to the right folder, just pass the absolute path via -C and this should clean up the script nice and reduce the potential for error a lot.

Just have a look at the documentation for the git command.

git help git
Enter fullscreen mode Exit fullscreen mode

Alt Text

Comments 0 total

    Add comment