Topics


Pages


Content

See also Git section of my Learn to Code project.

If you’re a more visual person, check out this visual Git cheat sheet available in multiple languages as well as light and dark modes.

Quick reference

Restore a file to match another branch.

$ git checkout my-feature
$ git checkout origin/master file.py