1 of 12

Git and

Version Control

The best Open Source Version Control System

2 of 12

Table Of Contents

Git Installation

Configuring Git for you

Tracking and committing your works

Understanding .gitignore

Pushing your work into the repository

Wrap up the session…

What is Git?

3 of 12

What is Git?

Version Control System

4 of 12

Git Installation

Windows: https://git-scm.com/downloads/win

Linux: sudo <package manager> install git

MacOS: brew install git

5 of 12

Configuring git for you…

git config --global user.name “<your name>”

git config --global user.email “<youremail@example.com>”

6 of 12

Must Know Git Commands

  • git help
  • man git

7 of 12

Tracking and Committing your Works

  • Initializing a git repo

git init

  • Adding files to git

git add <filename>

  • Committing changes

git commit -m “<commit message>”

  • Checking commit status

git status

8 of 12

Tracking and Committing your Works

  • git diff
  • git rm
  • git mv
  • git log [--oneline]

9 of 12

Understanding .gitignore

  • *.a
  • !abc.a
  • /example
  • inner-dir/
  • doc/*.pdf
  • guide/**/*.txt

10 of 12

Pushing your work into the Repository

  • git remote add <short-name> <repo-url>
  • git push -u <short-name> <branch-name>
  • git pull
  • git fetch

11 of 12

Let’s Wrap up…

  • For more read progit
    • Click to download
  • YT Video by FreeCampCode.org
    • Click to Watch

12 of 12

Thank you!