Is there a way to execute Git commands against a repository without being in that repository?
For example something like this: git /home/repo log?
Please do not tell me to cd to it. I’m doing this via an exec call.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try:
It is important to give the path all the way up to the .git directory of your repository. Otherwise you will get only an error message that says something like: