How do I set up .gitignore and readme in repository

I have recently established a pubic repository, but I do not know how to clone the repository, or set up .gitignore configurations or set up README files. This is my very first repository.

Could someone please give me some advice.

Thank you very much for your assistance,

Darrin.

Google is your friend; especially with beginner questions, or questions about file formats, it can often have very helpful results front and foremost.

A README is just a file of any type of text; such as Markdown, rST, AsciiDoc, plaintext. If it's plaintext, it will usually be either README or README.txt. If it's Markdown, it's usually README.md, but can also be just README.

It can contain anything, but common elements include:

  • The name of your project
  • A description (this will often be the only place you document your project in words)
  • Instructions for building/installation
  • Instructions for usage

The above aren't necessary, nor are they an exhaustive list; write whatever you like, however short or long, in any format you like.

As for a gitignore: cargo init likely gives you all you need for your project. You usually just use a gitignore for build artifacts, and any personal config for the project you don't want to share. If you don't have any of the latter, you probably don't need to worry about it.

If you do need to change it, I find the official git docs helpful on the matter.


By the way, this isn't really the forum for general programming advice, or git... really just Rust. I know it can seem silly or daunting to go elsewhere for one little question, but making those connections now will give you a better start, and a great place to ask questions even if you end up language hopping.

Kyllingene,

Thank you very much for your kind assistance.

I had tried google before contacting the Rust-Users Forum, but I was still confused. As I am going to write a program in the rust language, I thought it might be logical to contact your forum.

My apologies, by the way, if I have inconvenienced you at all.

Darrin.

This is a forum for Rust-specific questions. Your question is not about Rust but about the usage of GIT, which is a version control system.