# Using Git and GitHub for personal notes with a cheat sheet

Use Git and GitHub to track changes in personal notes. This page gives a cheat sheet with examples for daily use and private repositories.

Using Git and GitHub for personal notes gives you a versioned, backed-up system for your own writing. This page explains the basic commands and a simple workflow for keeping notes in a private GitHub repository. A cheat sheet with examples helps you commit and review your history. 

## Set Up a Private Repository 

A Git repository is the folder where your notes live and where Git tracks changes. To keep your notes to yourself, create a private repository on GitHub. This gives you a remote backup that only you can access. Once you clone it to your computer, you have a local copy ready for editing. 

## Daily Workflow for Notes 

The day-to-day workflow is straightforward: edit your notes, stage the changes, and commit them with a short message. Staging means telling Git which files you want to include in the next commit. A commit is a snapshot of your notes at that moment, saved in the commit history. Push your commits to GitHub to back them up online. 

## Cheat Sheet with Examples 

The commands you will use most are 'git status', 'git add', 'git commit', and 'git push'. For example, after updating a note, you run 'git add note.txt' and then 'git commit -m "Update note"'. The commit message is a note to your future self about what changed. Use 'git log' to review the history of a file or the whole repository. 

## Git for Personal Notes Questions 

### What is the difference between Git and GitHub? 

Git is the version control system that runs on your computer and tracks changes in your notes. GitHub is a hosting service that stores your Git repositories online. You can use Git without GitHub, but GitHub adds a backup and a way to access notes from anywhere. A private repository on GitHub keeps your notes hidden from the public. 

### How do I start using Git for personal notes? 

You start by creating a new repository on GitHub and cloning it to your computer. Then you add your note files to that folder and make your first commit. After that, you follow a cycle of edit, stage, commit, and push. The cheat sheet on this page lists the commands you need for that cycle. 

### Can I use Git without knowing many commands? 

Yes, you only need a handful of basic commands for personal notes. The commands are 'git add', 'git commit', 'git push', and occasionally 'git status' and 'git log'. Once you use these a few times, they become routine. A cheat sheet with examples helps you remember the order. 

### How do I keep my notes private on GitHub? 

You choose the private option when you create the repository on GitHub. A private repository means only you and people you invite can see the notes. You can still push and pull changes as usual. Your local repository on your computer is always private to you.
