How to save and load code in git

Zhao Li
4 min readSep 10, 2018

Problem

After you have a git repository set up, in order for git to be useful, you will want to save and load your code.

In git, saving code is called staging and committing your code. Loading code is called checking out your code. You can checkout specific branches, commits, or tags.

Solution

Staging and Committing

In git, saving your code is a 2-step process with git add (or git stage) and git commit.

  • Make the changes to…

--

--