I just added a remote (repo?) using the command:
git remote add my_remote_repo [email protected]:/g_my_remote.git
I was expecting this Repo to show up in the beanstalk. Or may be I am missing/not understanding something here. I am new to git.
The above command was successful and it shows up along with the other repos.
git remote -v
When you say remote
are we talking about new repo (as I am assuming)?
To git, a remote is just another repository that it knows about. In effect, remotes are like aliases to repository URLs. When you add a remote, you are only adding to the list of repositories that your repository knows about (tracks branches of). These repositories must exist before git can use them. You must add a repository to beanstalkapp.com via their web interface before you can link it to your own repository as a remote. The git remote
command performs no repository initialization.
As their name suggests, remotes are often in remote locations, but they are not necessarily remote. A remote can be a repository on your local machine. If you run the command git remote add local ../my_repo_copy
, you will see that git does not make a new repository at that location. To do that, you must first make a directory at ../my_repo_copy
, change into it (cd ../my_repo_copy
), and initialize it as a new git repository (git init
). Once you have initialized the new repository in that manner, you can use it as a remote to your original repository.