11. What is Git?
04
Git is a distributed version control system that tracks
changes in any set of computer files.
By- Alya
12. What is Git?
Git is a DevOps tool used for large source code management.
It is a free and open-source version control system used to
handle small to very projects efficiently. Git is used to tracking
changes in the source code, enabling multiple developers to
work together on non-linear development.
13. Git Features
● Tracks history
● Free and open source
● Supports non-linear development
● Creates backups
● Scalable
● Supports collaboration
● Branching is easier
● Distributed development
14. What is GitHub?
05
GitHub, Inc. is a platform and cloud-based service for
software development and version control using Git.
By- Dewan
Shakil
15. Github Account creation
● First go to github.com
● Click on Sign Up
● Now Enter your Email
● Create a strong password
● Do Verification and revisit the github’s official website
● Now click on sign in and sign in by the same email and password
16. What is Git CLI?
Git CLI (Command Line Interface) is a powerful tool for version
control:
● It allows users to manage and track changes in their
code or any set of files efficiently.
● With the Git CLI, users can perform various operations
such as creating repositories, staging changes,
committing modifications, branching, merging, and
interacting with remote repositories hosted on platforms
like GitHub, GitLab, or Bitbucket, all through text-based
commands in a terminal or command prompt.
By- Saksham Sharma
17. Installing Git CLI
In Mac OS, the terminal itself
can do everything and git is
pre-installed in mac. You can
also Install third party terminals
such as Hyper.is which will work
in every OS.
When you Install git it came
with a terminal called gitbash.
You can use any terminal that
you have on your computer
such as Command Prompt,
Powershell
Git Bash
(Windows)
Terminal
(Mac and Linux)
18. Basic Commands
for Git CLI
git config --global user.name "user_name”
The "git config --global user.name 'user_name'" command sets the global
username for Git, associating the provided 'user_name' with your commits
across all repositories.
git config --global user.email email
The "git config --global user.email email" command sets the global email
for Git, linking the specified 'email' with your commits across all repositories..
19. Basic command
for git CLI
git config --global init.default branch main
The "git config --global init.default branch main" command sets the default
branch name to 'main' when initializing new repositories globally in Git.
git config -h / git –-help
The git config -h command displays a brief summary of the git config
command and its usage options. It provides a quick reference for the config
command's basic functionality and how to use it.
21. What is a Repository?
A repository, or repo, is a centralized
digital storage that developers use to
make and manage changes to an
application’s source code.
Developers have to store and share
folders, text files, and other types of
documents when developing
software. A repo has features that
allow developers to easily track code
changes, simultaneously edit files,
and efficiently collaborate on the
same project from any location.
23. Cloning a repo
Once The repository is created,you will get a
rectangle,once you create your repository
And then go to your terminal and type
git clone <the copied link>
29. Branching
● Branching in Git, including GitHub, is a
powerful feature that allows developers
to work on different aspects of a project.
● Simultaneously, experiment with new
features, and maintain a clean and
organized version history.
08
30. Creating a Branch:
1. Local Branch
● To create a new branch locally, use the
following command in your Git repository:
Code: git checkout -b new_branch_name
1. Remote Branch (GitHub):
● After creating a local branch, you can push it to
GitHub to make it available remotely:
Code: git push origin new_branch_name
Main
31. Switching Between
Branches:
● Switching Between Local Branch
git checkout branch_name
● Switching Between Remote Branch
git checkout -b local_branch_name
origin/remote_branch_name
32. Merging Branches:
1. Local Merge:
● After making changes in a branch, you can merge
it into another branch using:
Code: git checkout destination_branch
git merge source_branch
1. Pull Request on GitHub:
● You create a PR to propose changes and discuss
them before merging. You can initiate a PR
directly on the GitHub website.
33. Deleting Branches:
● To delete a local branch after merging:
Code: git branch -d branch_name
● To delete a remote branch:
Code: git push origin --delete branch_name
36. Forking
A fork in Git is simply a copy of an
existing repository in which the new
owner disconnects the codebase from
previous committers
What is Forking?
Forks are often used to iterate on ideas
or changes before they are proposed
back to the upstream repository, such
as in open source projects or when a
user does not have write access to the
upstream repository. Or if they make
changes to the project in a major way
and want to have a different code base
When to use forking?
37. Pull Request
What is a PR?
A pull request on GitHub is like asking
your friend if they like the changes you
made to a shared project before adding
them. It helps keep everyone's work
coordinated and in good shape.
Not Understood?
38. Let’s be practical !!
Go to the repo
Fork it!
Clone the
fork and edit
Push and
create a PR
01 03
02 04
What we will do?
github.com/imdewan
40. Let’s recap and see how you can
use these in the industry !!
Get the project
Pre work
Start the work
Push and PR
01 03
02 04
1) Initiate the
project
2) Evaluate
3) Communicate
your estimates
4) Start the
project
1) Create branch
2) Clone
3) Communicate
1) Find resources
2) Work
3) Communicate
1) Create PR
2) Resolve issues
3) Ask for
feedback
45. CREDITS: This presentation template was
created by Slidesgo, and includes icons by
Flaticon, and infographics & images by Freepik
Thanks!
Socials-
LINKTR.EE/GDSC_AU
Please keep this slide for attribution
Do you have any questions?
gdsc.alliance@gmail.com