Repositories

A repository contains all of your project’s files and each file’s revision history.

Repository Structure

my-project/
├── .github/
│   └── workflows/
├── src/
├── tests/
├── .gitignore
├── LICENSE
└── README.md

Common Operations

Clone

git clone https://github.com/user/repo.git

Add and Commit

git add .
git commit -m "describe your change"

Push

git push origin main

Pull

git pull origin main

.gitignore

Use a .gitignore file to exclude files from version control:

node_modules/
.env
dist/
*.log

GitHub provides gitignore templates for most languages and frameworks.


This site uses Just the Docs, a documentation theme for Jekyll.