What does the README.md file in git repo do?

Pankaj Badukale picture Pankaj Badukale · Aug 6, 2015 · Viewed 8.2k times · Source

We have been using git repositories for projects. Also we download some code from there(Say sample code).

I found ReadMe.md file on each repository.

Why is it there? AND what is meaning of .md?

Also each folder contain that file some time. Why people add that file in git repository?

I don't have any idea, I want to know it as I started using git for code source management.

Answer

Maximillian Laumeister picture Maximillian Laumeister · Aug 6, 2015

A Readme file is a file that describes the purpose of the repository and gives hints on what the code does, how to compile/use it, etc.

The .md extension stands for Markdown, which is a type of file that is both readable in plain text, but can also be easily converted to HTML to display special elements.

Stack Overflow happens to parse the same markdown syntax for questions and answers, so here are a few examples of what Markdown can do:


Headings

Links

  • Lists
  • of
  • items

The Markdown code I used on Stack Overflow to create those was:

# Headings

[Links](http://google.com)

* Lists
* of
* items