# Automated Version Control What is version control and why should I use it? Note: - Git all set up? - SSH working? - Otherwise: breakout room --- “Piled Higher and Deeper” by Jorge Cham, http://www.phdcomics.com --- ## Documents are...
a series of changes
--- ## Collaboration
independent changes
can be merged
--- ## Version Control: Key Points - Version control is track changes on steroids. - Version control is like an unlimited **undo**. - Version control also allows many people to work in parallel. --- ## The Holy Realms of Git
  • workspace  📂
    • Your filesystem
  • index  🕒
    • Staging area
    • Files wait patiently to be committed
  • local repository  🗂️
    • Contains branches, commits, history, etc.
    • --- ## Crowded Staging Area / Index The Staging Area / Index can hold many files and folders. --- ## Quiz 1/2
      Which commit message should I choose?
      1. “Changes”
      2. “Added line ‘This project started as a joke’ to myfile.txt”
      3. “Discuss origin of the project”
      Make it short, descriptive, and imperative 🐺
      So yeah, the last one is good! 🐺
      --- ## Quiz 2/2
      Which command saves myfile.txt to my Git repo?
      1. 
            $ git commit -m "my recent changes"
            
      2. 
            $ git init myfile.txt
            $ git commit -m "my recent changes"
            
      3. 
            $ git add myfile.txt
            $ git commit -m "my recent changes"
            
      4. 
            $ git commit -m myfile.txt "my recent changes"
            
      3. adds your file to the index, and then commits it. That's the one. 🐺
      --- ## Tracking Changes: Key Points - Files can be stored in - **working directory**: the files you can see - **staging area / index**: files about to be committed - **local repository**: the permanent record - **git status**  shows the status of a repository - **git add**  puts files in the staging area - **git commit**  saves the staged content as a new commit in the local repository - Write short, descriptive, and imperative commit messages