Skip to content

Everyday Git

Last updated 2026-08-20 · 5 notes · 3 tags

Tags: git github status

Git saves snapshots of your project so you can undo mistakes and publish to GitHub. Run these commands from inside your project folder (cd ~/projects/your-project).

Status — what changed?

git status

Note: Run git status often. It is the safest way to see what Git will include in the next save.

Pull — get latest from GitHub

git pull

Use this before you start work if others (or another computer) may have pushed changes.

Add — stage files to save

git add .

Stages all changes in the current folder tree. To stage one file:

git add path/to/file

Commit — save a snapshot

git commit -m "Short description of the change"

Note: Write the message for a future you: what changed and why, in one short sentence.

Push — upload to GitHub

git push

Fetch — check remote without merging

git fetch

Note: fetch downloads updates but does not change your files yet. pull fetches and merges.

Log — recent history

git log --oneline --graph

Branches — list them

git branch
git branch -a

Note: main (or sometimes master) is usually the primary branch. Create feature branches when you want experiments isolated — see Branches.

Typical daily loop

git status
git add .
git commit -m "Describe the change"
git push

Note: If git push asks you to set an upstream the first time, follow the exact git push --set-upstream ... line Git prints, or use gh after gh auth login.

Common mistakes

  • Commit before large deletions or refactors.
  • Do not commit secret files (.env, API keys). Add them to .gitignore.
  • If Git says “not a repository,” you are in the wrong folder or never ran git init / cloned the project.

This project chronicles ideas, decisions and lessons I have gleaned from building with AI. The goal is to help non-technical users get familiar with these tools and techniques, so that they may be able to use them effectively. At times, I have also made the use of AI tools to augment or refine the content.

Readers are responsible for using any commands or instructions published here with due caution. The creator of this site accepts no responsibility for any system damage, data loss or other consequences, resulting from the application of this content.