Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what should be in the git description file?

Tags:

git

After initialising a new local repo there is a description file present.

What is it used for and how should I format it? Or is it simply a local helper file.

This thread Accessing git's `description' file suggests one style, but no man page or other reference to why it should be the way it is.

like image 868
Philip Oakley Avatar asked Jul 28 '11 23:07

Philip Oakley


People also ask

What does .git file contain?

The . git folder contains all information that is necessary for the project and all information relating commits, remote repository address, etc. It also contains a log that stores the commit history. This log can help you to roll back to the desired version of the code.

What are the 3 git states that a file can be in?

Git has three main states that your files can reside in: modified, staged, and committed: Modified means that you have changed the file but have not committed it to your database yet.


2 Answers

description file is only used by the GitWeb program ( to display the description of the repo on the GitWeb page)

https://git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain

Otherwise, how you use it is left to you and I don't see a point in a "style" for it.

like image 58
manojlds Avatar answered Oct 17 '22 08:10

manojlds


The description file can also be read by hook scripts or other scripts pertaining to the repository. For example, one popular hook script, post-receive-email, sends an email to all members when a commit is made to the repository, and uses the contents of the description file as the name of the repository in the email subject.

like image 25
mindthief Avatar answered Oct 17 '22 08:10

mindthief