as stated in the subject
note: the git clone i mean is the git clone without any option, the one which is performed by doing "git clone /C:/my_origin_folder"
Cloning a repository gives you a copy of that repository and configures the original repository as a remote. Copying a repository just gives you a copy of that repository.
When you download the repo it just gives you all the source files with no . git so you dont have the repo. When you clone you get a copy of the history and it is a functional git repo.
git clone is primarily used to point to an existing repo and make a clone or copy of that repo at in a new directory, at another location. The original repository can be located on the local filesystem or on remote machine accessible supported protocols. The git clone command copies an existing Git repository.
Technically speaking, git can operate just fine with copied repositories running around everywhere, because the whole point of a DCVS is that it doesn't have to know what's going on outside of any given repository, and in fact doesn't unless you tell it.
This answer of mine regarding backup should give you some answer on clone vs copy: Moving a git repo to a second computer?
Main differences:
origin
setup pointing to original repo, so that you can push to it.Note that when you clone with a folder path, the differences change subtly, as the objects and refs are usually just copied / hardlinked ( equivalent of --local
which is the default with local folder paths)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With