You are currently in PREVIEW mode

Buy this book or become a member for full access.


Git Fundamentals

Appendix A. A Git Mini-Reference

List of Basic Git Commands

This summary of basic Git commands should be handy as a reference while you explore and learn more:

  • Tell Git what files to track for changes

    • git add <filename, folder name or list of filenames (separated by spaces)>

  • Store the current state so you can always return to it

    • git commit -amA message that will help you understand what this commit contains

  • To restore all the files from a previous commit

    • git checkout <an unambiguous portion of the hash>

  • To get the hashes of previous commits

    • git log

  • To interact with “remote” git repositories (such as projects on Github)

    • git push

    • git pull

Have your say! or become a member now to take part in the discussion

Loading...