Week 1: Your First Rails Application · Lesson 2 ·
Git lets you save different versions of your files to make it easier to work with a team, or to go back to previous saves.
Exit the server with Control + C
.
Now http://localhost:3000 will give you an error if you try to go there.
Check to make sure you have Git set up
$ git --version
git version 2.X.X
You only do this once per computer
$ git config --global user.name "Mattan Griffel" # Replace what's in the quotes with your name
$ git config --global user.name
Mattan Griffel
$ git config --global user.email "mattan@onemonth.com" # Replace what's in the quotes with your email
$ git config --global user.email
mattan@onemonth.com
You only you do this once in the beginning of every new project
$ git init
You'll run these commands a lot:
$ git status # Shows you what files you are tracking (or not tracking)
$ git add -A
$ git commit -m "Initial commit"