![]() ![]() So if you don’t tell it what you want your remote to be called, then it will call it ORIGIN by default. When you initially clone a repository using git clone, it automatically creates a remote connection called ORIGIN pointing back to the cloned repository. ORIGIN is just a shorthand name for the url of a remote repository. If you were to run the command git remote add origin and then command git remote add ORIGIN you will have two new remotes, one called origin and one called ORIGIN! Git is case sensitive so it is fairly easy to accidentally create multiple remotes. However it’s good to know how to add and remove a git remote. One repository can have multiple ‘remotes’ – although most generally you will only have one. Once created, the repository has a unique url – the url of this remote repository that I’ve created is: Here is a screenshot of what it looks like when you create a new repo in github. Create the remote repo in githubīefore you can do anything else you need to make sure the remote url exists in your github account, and for that to be the case you need to create a new repository. The remote repo can then be cloned by others so they can also contribute to the code in the repo. You need to set up an account with github / gitlab / bitbucket which are some of the many hosts of remote repositories. So if you change your local files, the remote ones won’t change until you ‘commit’ your local changes and ‘push’ them to the remote repo. Once you push your files from your local repo to your remote repo it means there is a copy of them in a remote location.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |