If remote (using ssh) does not contain the git repository, is it still possible to copy the local repository to remote and setup the remote tracking without manually copying the files using scp and doing then followed by a git clone?
Share
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.
You do need to setup the repository on the remote, but you shouldn’t copy the files manually. At the very least, you don’t get the history with it.
First, ssh to your remote and do this:
The
.gitin directory name is completely optional. The--bareoption makes the repository without index and is therefore pushable.You then go back to your local repository and add the remote:
You are all set. All you need to do now is: