HACK CLUB

SSGI

Git & Github Session

What we will be covering 

🔸VCS
🔸Git
🔸Git Commands
🔸Git workflow
🔸Github
🔸Make a Pull Request 

Git != Github

What is Git 
And why is it so popular ?

Git is a version control system used in software development.

What is this Version Control System ????

Version Control System

They are a category of software tools that helps record changes to files by keeping a track of modifications done to the code.


Problem That VCS Resolves

  • Collaboration
  • Storing Versions
  • Figuring out what happaned
  • Backup

version control 

 

Git Workflow

git commit

git add

git push

Let's Do

Hands-on

Branch

A branch represents an independent

line of development.

  • Branch is a ‘branch’ from the main code trunk to try a new feature

  • Not just trying new features, branches can be used to see these new features’ compatibility with the main trunk of the code

  • When a git repo is initialized, it creates the default branch ‘master’

  • If compatible, branches can be merged into the master branch

Branching

Merging Branch

Merge Conflict

A merge conflict is an event that

occurs when Git is unable to

automatically resolve differences

in code between two commits

made in two different branches

during a merge.

 GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere.

Repository

Think of this like a project folder where code is stored!

 

Important icons in

Repo Page

 

Files you should look first

 

 

  • README.md

  • LICENSE

  • CONTRIBUTING.md

  • CODE_OF_CONDUCT.md

  • CHANGELOG.md

  • .gitignore

Let's Do

Hands-on

ISSUES

a way to share a problem about someone else's code, without necessarily submitting your own solution

 

Pull Request

 

A way to ask to make changes to someone else's code by submitting your own changes for their review

 

Pull Request Icons

 

 

Let's Make a

Pull Request

NetworkingÂ