
See Our team
Wondering how we keep quality?
Got unsolved questions? Ask Questions
GATE
GMAT
CBSE
NCERT
Career
Interview
Railway
UPSC
NID
NIFT-UG
NIFT-PG
PHP
AJAX
JavaScript
Node Js
Shell Script
Research
How is a bare repository different from the standard way of initializing a Git repository?
Git interview questions
The standard way of initializing a new Git repository is to run
git init
. The directory in which you do this will be become the Working Tree for the repository.As part of the initialization process, Git creates a
.git
directory (which his hidden by default because of the.
in the name) that contains the repository itself. This is brains of the repository; it's where Git tracks your changes, stores commit objects, refs, etc. You probably only rarely interact with that hidden directory.Okay, so all of this is to lay the groundwork for understanding a bare Git repository. What the heck is it?
A bare Git repository is a repository that is created without a Working Tree. Go ahead and create one to see.
git init --bare .
Run
ls
on that directory and you won't see a Working Tree but just the contents of what is typically in the.git
directory.Why this setup?
A bare Git repository is typically used as a Remote Repository that is sharing a repository among several different people. You don't do work right inside the remote repository so there's no Working Tree (the files in your project that you edit), just bare repository data.
You might like this video:VS Code in 100 Seconds Watch more here
Watch more videos from this user Here
Learn how to upload a video over here
We made eduladder by keeping the ideology of building a supermarket of all the educational material available under one roof. We are doing it with the help of individual contributors like you, interns and employees. So the resources you are looking for can be easily available and accessible also with the freedom of remix reuse and reshare our content under the terms of creative commons license with attribution required close.
You can also contribute to our vision of "Helping student to pass any exams" with these. Answer a question: You can answer the questions not yet answered in eduladder.How to answer a question Career: Work or do your internship with us.Work with us Create a video: You can teach anything and everything each video should be less than five minutes should cover the idea less than five min.How to upload a video on eduladder