Synchronizing Code With Version Control

less than 1 minute read

  • describe idea and use cases for version control
  • use version control to synchronize files between a laptop and a server

This is an introduction to git, assuming no experience with version control. git is another industrial grade software tool, with capabilities far beyond what we’ll cover today. Today we’ll see one version of “best practices”.

Announcements

123 GO - what makes you productive when you study?

  • Mid quarter check in survey due tomorrow

A commit in version control saves a snapshot of your codebase. {.t}

123 GO - When is a good time to take a snapshot?

You can push and pull changes between local and remote machines. {.t}

Three places for code:

  • laptop
  • EC2 instance
  • Git server (Github, bitbucket, …)

What are the benefits of version control? {.t}

hw1v1.pdf, hw1v2.pdf, hw1v3.pdf, hw1final.pdf, hw1final2.pdf, …

git, svn (subversion)

Demo

  • Uploading SSH keys to Github
  • Creating EC2 instance with more disk space
  • ssh -A to use key forwarding
  • Cloning
  • Pushing, pulling
  • Merging with and without conflicts

Updated: