How to become a Git Dumbledore…!(The Secrets of .git Folder)

Image for post
Image for post
Dumbledore committing his magic spells on Git.

What is this blog about?

What is Git — A Brief Introduction:

Git — Under the hood.

Image for post
Image for post

How does Git keep track of your project?

Image for post
Image for post
Initialized Git repository using “git init” command.

Three States of Git(Just a quick refresher)

Image for post
Image for post
Three sections of git:- working directory, Staging Area and Repository.
Typical workflow when working with version control.

The Mystery of the contents inside the .git folder:

Image for post
Image for post
Image for post
Image for post
The output of "tree .git" showing the contents of .git folder.
Image for post
Image for post
Created an empty Readme file using touch command.
Image for post
Image for post
Git status showing that the Readme file is untracked by it.
Image for post
Image for post

Types of Object that get stored:

BLOB

Commit and Tree

Image for post
Image for post
Image for post
Image for post
Image for post
Image for post

Master: The default branch

Image for post
Image for post

Parent-Child commit relationship

Image for post
Image for post
Image for post
Image for post

Conclusion

Image for post
Image for post

Written by

Software Engineer Trainee at Mount blue Technologies.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store