Skip to main content

Git Basics

Get started with git:

  1. Create a new repo
mkdir my_project
cd my_project
git init
  1. Track changes on a file
touch README.md
git add README.md
git commit -m "add a readme"
  1. Make changes to a file
echo "# My Project" > README.md
git add -p # type y to add changes to a changeset
git commit -m "provide a title to the readme"