Git & GitHub 101farwsfrwvnfuvnvjvvv.pptx

sihoxe6756 8 views 35 slides Mar 02, 2025
Slide 1
Slide 1 of 35
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35

About This Presentation

ititeyurureyqewrdassffffffffffffdggdfhdadasfdh


Slide Content

SHARDA KAUR BCA Microsoft Learn Student Ambassador | Open Source Contributor | Cybersecurity | Data Science | Cloud Computing Git & GitHub 101.pptx Git & GitHub 101.pptx

GIT GITHUB Welcome Everyone

So What is Git? Git is a free, open-source  version control software . This basically means that Git is a content tracker. So Git can be used to store content — and it is mostly used to store code because of the other features it provides. 

What is a Repository ? A  repository   is nothing but a collection of source code. There are four fundamental elements in the Git Workflow. Working Directory , Staging Area ,  Local Repository , Remote Repository .

GIT Commands git add  git commit  git push  git fetch  git merge git pull 

Install Github To create your account, you need to go to  GitHub 's website and fill out the registration form.

Create the repository, clone it to your PC, and work on it.

Well Done ! Your first GitHub repository is created.

Collaborating

Now below is an example of a project my friend and I are collaborating on: $ git pull origin main

$ git fetch AND $ git merge When you use git pull, Git tries to automatically do your work for you.  When you  git fetch , Git gathers any commits from the target branch that do not exist in your current branch and  stores them in your local repository .

Resolving Merge Conflicts An Event that takes places where git is unable to automatically resolve the differences in code between two commits.

Undoing Changes Case 1 : staged changes (add) git reset <-filename -> (single file) git reset (Multiple file) Case 2 : committed Changes (for one commit ) git reset HEAD ~1 1 4 3 2 Head Head Latest Previous one

Undoing Changes Case 3 : committed Changes (for many commit ) git reset <-commit hash -> git log ( to get hash ) git reset --hard <-commit hash -> 1 4 3 2 Head Latest Hash eg : c71fb8fe43281f092f6c30e409bf94fd138a20d4 Head

Forking

Let's Practice Forking Browse to this public repository:  https://github.com/atapas/fork-me

Git Checkout  Git documentation .

Checkout a specific commit to checkout a specific commit, run the command : git checkout specific-commit-id we can get the specific commit id’s by running: git log Checkout an Existing Branch To checkout an existing branch, run the command: git checkout BRANCH-NAME

Checkout a New Branch To create and checkout out a new branch with a single command, you can use : we can get the specific commit id’s by running: git log Checkout an Existing Branch To checkout an existing branch, run the command: git checkout BRANCH-NAME git checkout -b NEW-BRANCH-NAME

Git Storage Service Providers

Issues

Issue Created

Pull Request

Pull Request

Successfully Merged

Code Review

Code Review

Thank you for attending Q&A

We have just created a new file called “ home.html ”. Which of the following will add this file so that we can commit it in git?
Tags