0% found this document useful (0 votes)
41 views

Installation Doubts?: Workshop Will Start at 3:00 PM

The document provides an overview of a Git and GitHub workshop. It outlines the learning outcomes which include learning basic Linux commands, understanding version control systems and Git, and being able to use Git to track code, push/pull from GitHub, and properly submit a pull request. It then describes the workshop flow, introduces concepts like what Git is and how it works, demonstrates Git commands, covers branching and merging, and shows how to contribute to a GitHub repository via forking, branching, committing, pushing, and submitting a pull request.

Uploaded by

Shubham Kapadia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Installation Doubts?: Workshop Will Start at 3:00 PM

The document provides an overview of a Git and GitHub workshop. It outlines the learning outcomes which include learning basic Linux commands, understanding version control systems and Git, and being able to use Git to track code, push/pull from GitHub, and properly submit a pull request. It then describes the workshop flow, introduces concepts like what Git is and how it works, demonstrates Git commands, covers branching and merging, and shows how to contribute to a GitHub repository via forking, branching, committing, pushing, and submitting a pull request.

Uploaded by

Shubham Kapadia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Installation Doubts?

Workshop will start at 3:00 pm.


Git & Github Workshop
Learning Outcomes
- Familiar with Basic Linux commands
- Realize the importance of Version Control System
- Be able to use Git to track your code
- Be able to push and pull code from Github
- Be able to send a PR properly to an existing Github Repository
Flow
- Raise Doubts
- Hands On
- Fun quiz
- We would be here after the end
Become a Terminal
Ninja
What is Git?
Track
- Backup
- History
- Experiment
- Collaborate
How does Git do it - Snapshots AKA Commits
Mental Model of Git Workflow
DEMO
git init

git add FileName

git commit -m “A nice commit message”


This Staging Area is Confusing!

WORKING STAGING AREA COMMIT !


DIRECTORY
Hands On by Building a “facebook Clone”
JUMPING BETWEEN STAGES - EVIL CAT
TRILOGY
Undo the changes after a Commit

Case 1

Working tree clean

Cat comes up and adds rubbish files and and garbage content

You come back and check git status. It’s too chaotic

You want to undo !

Just do git checkout .

And you have recovered your codebase


Restoring code after files are in Staging Area

Case 2

This time it plans to commit

It adds rubbish files and rubbish content

It does git add .

And luckily u come in time and it runs away

How do u unstage?

Git reset --hard HEAD


Going back to a Previous Commit
Part 3

This time the cat makes NOT 1 but 2 Rubbish commits 😦

Git reset --hard COMMIT_HASH_YOU_WANT_TO_GO_BACK


DOUBTS
Intro to Branching
Branching
Branching

master
branch
master
branch
master
branch
master
branch

exp
branch
master
branch

exp
branch
master branch after merging changes from exp branch
Hands On

Make a branch named poke and add poke feature


DOUBTS
Github
Alone we can do so little, together we can do so much

-Helen Keller
Github Authentication:

● Personal Access Token


Let’s rock push and roll pull
Remotes
origin = https://github.com/username/repoName
Demo - Send a PR
- Fork
- Clone
- New Branch
- Commit
- Push
- Pull Request ( in github )
Workflow - Contributing to a Repository on

kossiitkgp/codebase
Workflow - Contributing to a Repository on
I can fix this!

kossiitkgp/codebase
Workflow - Contributing to a Repository on

eric/codebase
kossiitkgp/codebase
Workflow - Contributing to a Repository on

eric/codebase
kossiitkgp/codebase

Clone
Workflow - Contributing to a Repository on

eric/codebase

Eric works hard and


fixes the bug and he
PUSHES
Workflow - Contributing to a Repository on
Pull Request

eric/codebase
kossiitkgp/codebase
Workflow - Contributing to a Repository on

After
MERGING
the Pull
Request, it is
kossiitkgp/codebase now free of
bugs!
We want you to send a PR
Some good places to try out
- Check out metakgp repositories
- Issues with label - good-first-issue
- Participate in KWoC-2021(Keep following KOSS on facebook for updates)
For more...
- Check out for advance resources here
- Get GitHub Student Pack
- Participate in Hacktoberfest
- Checkout out Github Pages, host your static site for free
We Want Your Feedback
Feedback form - https://bit.ly/3poan46
Just a Feedback for your understanding
- TODO Add Link

THIS IS NOT A TEST


IT’S ANONYMOUS
DOUBTS

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy