Skip to content

Instantly share code, notes, and snippets.

@YumaInaura
Last active September 15, 2018 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YumaInaura/cb77ff9ff7bf3dcdabca0932ffe97fd2 to your computer and use it in GitHub Desktop.
Save YumaInaura/cb77ff9ff7bf3dcdabca0932ffe97fd2 to your computer and use it in GitHub Desktop.
Git for beginners — What is repository? A repository is a directory ?

Git for beginners — What is repository? A repository is a directory ?

There is a normal directory

image

When git puts a spell on a directory

image

Then "Repository" will be born by magic

image

It is a mistery as also birth is a mistery.

Repository and Directory are friends

So repository seems eqaul to a directory.

image

A repository is a directory ?

It is about correct understanding but actually not.

Because we can have one repository with in other directories.

For example Alice has a repository in her local directory and Bob also has and Carol has and etc ….

image

You can two or more directories with related with one repository on your local.

Remote repository

We can have also a same repository in remote.

image

image

If a directory is deleted but a repository is keep on existing.

unless all directories deleted from the world.

image

ETC

  • In popular OSS many people pull from same repository.
    • There is a one kind repository and many local directories related with git control.
  • If in the future OS got "nor directory" system but git "repository" may keeps on.
    • Because OS directory is lower level working system but git repository is the high level abstraction.

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment