Git basics

Git is a very complex tool; only the basics that are needed for this book will be covered in this section.

To learn more, refer to the Git documentation at http://www.git-scm.com/doc.

Git does not track your changes automatically. In order for Git to run properly, we have to give it the following information:

  • Which folders to track
  • When to save the state of the code
  • What to track and what not to track

Before we can do anything, we have to tell Git to initialize a new git repository in our directory. Run the following code on your Terminal:

$ git init

Git will now start to track changes in our project. As git tracks our files, we can see the status of our tracked files and any files that are not tracked by typing the following ...

Get Mastering Flask Web Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.