3 ms·
It is very much like dropbox, in that a repository is a special purpose folder that the git application can run against. One difference is that you can have mu
by thomaslangston 15y ago
It is very much like dropbox, in that a repository is a special purpose folder that the git application can run against.
One difference is that you can have multiple of these folders, not only on your local machine but also on remote servers.
- brador 15y agoSo let me see if I get this right. A repository is like a slave folder to a master folder, when the master folder is updated (the github folder) the contents are automatically copied to all repositories. In this way, it saves from having to update all folders manually and keeps everything in one place, with only one thing needing changes, which then propogate automatically to where they are needed? Any idea what version control is?
- danneu 15y agoi use git and here's an example. you can think of a repository as a git-aware folder of code. if you go into your My_Documents folder, type `git init`, it's now a repository. if you click New Repository on github.com, navigate back to your local My_Documents repo, type `git remote add my_github_repo git@github.com:brador/my_documents.git`, you can then push your local repo into that repo with `git push my_github_repo` from your local repo. or if someone else commits to my_github_repo, you can pull changes downstream with `git pull my_github_repo`. git will check repos against eachother for conflicts. i don't think a "master folder" really makes sense. if you're developing an app, you generally start with that local git init repo, and then you may push it to github. but then you may delete that local repo or go to another computer and type `git clone git@githjub.com:brador/my_documents.git` and it creates a local repo that you can resume working on. i think the point of decentralized version control like git is that there doesn't need to be a master repository. you can always merge repositories into eachother.
- brador 15y agoThanks, that explanation actually makes quite a lot of sense!