Basics

Git is a version control system (VCS) and it is used to help you keep track of your changes and develop large projects in large teams. It is also a source code management (SCM) tool.

Creating a git project

To create a git project you should:

  1. create a folder “firstGitProject” on your device
  2. visit that folder
  3. create a file “hello.txt” and write something in it
  4. open the command prompt (the terminal) in that folder
  5. write git init in the command prompt; this will make that folder a git folder

Saving your changes for the first time

  1. visit your git folder and open the command prompt there
  2. write git add hello.txt in the command prompt; this tells git that you want to track changes made in hello.txt file
  3. write git commit -m "I wrote something in my hello file"; this tells git to save the changes; -m "message" is used to add comment about what you have changed

Updating changes

  1. visit your git folder and open the command prompt there
  2. edit hello.txt file content
  3. tell git that you want to track the changes you have made in hello.txt file
    have you figured out how to do this?
  4. tell git you want to save those changes
    you can commit with a message

In your project folder you will have a hidden folder .git where you have a history of changes. You will learn how to see those changes graphically.