U
U
user_of_toster2021-04-24 04:56:05
git
user_of_toster, 2021-04-24 04:56:05

What is the practical value of a bare repository?

How is the bare repository used? How is it different from the usual one, except that it saves space on the working tree? You can find the following arguments:


It saves space (do text files take up a lot of space?)
default remote origin is not set (what is the use of this, you have to manually enter it?)
Best practice is to use the bare repository where everyone will push commits.


Is it really the bare repository that is hosted in practice, where all the commits are pushed? Is the saved space worth the opportunity to remotely view the files directly in the browser on the github?

https://www.atlassian.com/git/tutorials/syncing/gi...
Bare repos don't have a working directory so a push will not alter any in progress working directory content.

The running working directory content is just a mirror of the last commit, isn't it? How can we somehow change the in progress working directory content??

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2021-04-24
@user_of_toster

bare - just a real repo for shares to others.
It's not about saving space at all.
Git doesn't explicitly store files at all. it saves a snapshot on initialization/adding, and any changes are a set of deltas (diffs).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question