I’ve got a bare git repo on my test and production web servers. I cloned one of the two to my dev machine.
How can I figure out which one I cloned? That is, if I do a git push, which repo will I be affecting?
Thanks
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.
git remote -vThat will print the full list of remotes for the current repository, plus the URL they pull and push to/from.
By default git requires you to be explicit about what remote you are using, but you can configure it to default to
origin, which is standardly the place it was cloned from. (…but you don’t have to call it that, and you can change that later.)