Home Coding GIT part-2 Concepts and architecture

GIT part-2 Concepts and architecture

3 min read
0
0
161
Two-tree-architecture

Git uses three-tier tree architecture for its repository’s files and commits, which is very handy. The illustration (a) below shows a typical two-tier tree set up which other version control systems use. The working depository is a root folder, which you have set up on your computer too manage your files this is done through setting up a root folder navigating to it through the command line and then initialising it as a repository i.e. git – init

When we wish to receive files i.e. clone or fork a repository we check it out from the repository into our working repository or copy.
When we wish to make changes or send files to the repository we call it a commit.
The reason we have two different repositories is that the files don’t have to be the same when you make changes to your working copy, you save them and they are saved on your hard drive, both different copies are saved, and until you choose to…. You can commit those changes to the repository. If the repository is a shared one there can be many different people working on it.

Three-tree-architecture
Three-tree-architecture

Three Tree architecture

As I mentioned earlier Git uses a three-tier tree, which adds another area called a staging area. See illustration b) This allows us to have 10 different files in our working directory (for example) and allows us to prepare five which we wish to add to our staging index in preparation for a commit. When we are happy we commit those five files with a message to our repository where git will track it.
Conversely we can pull or checkout our files to our working directory or staging index. more often than not you will pull them straight to your working directory.

  • Bob Hawke

    https://github.io.Jonathon/tribute/Tribute page to Bob Hawke …
  • recipe complete

  • recipe grid phone

    browser reduced …
Load More Related Articles
  • Bob Hawke

    https://github.io.Jonathon/tribute/Tribute page to Bob Hawke …
  • recipe complete

  • recipe grid phone

    browser reduced …
Load More By JD
  • Octocat GIT

    What is GIT?

    Understanding version control Git is software for keeping track of  changes in files and d…
  • URL Types

    When attaching an external JavaScript file to a web page, you need to specify a URL for th…
  • material design

    Material Design- Materialize

    Created and designed by Google, Material Design is a design language that combines the cla…
Load More In Coding

Check Also

What is GIT?

Understanding version control Git is software for keeping track of  changes in files and d…