SlideShare a Scribd company logo
Extra Bit With GIT
OPEN SOURCE
It denotes the software for
which the original source
code is made freely available
and may be redistributed and
modified
WHAT IS GIT
Git is a free and distributed version control and source code
management system with an emphasis on speed and
efficiency.
WHAT IS GITHUB
● Github is a web based Git repository hosting service
which offers all version control functionality of git and
adds some features of its own
Repository
A repository is a collection of all the
project files and it also stores each file’s
revision history.
REPOSITORY & WORKING DIRECTORY
Working Directory
The working directory is the place
where all the files of your repository
are located.
WHAT WE WILL LEARN
Understanding Version Control System
Basic git functionality
Create your open-source project
Contribute to others projects
TOPICS WHICH WE WILL COVER
Installing GIT on local system
Creating a REPOSITORY (repo)
How to CLONE a Repo
How to COMMIT and Push in a Repo
Basics of FORKing a Repo
WORKFLOW OF GIT
Make changes in your Working Directory.
Add your changes to Staging Area.
Commit your changes to Repository.
Push your code to Github.
Installing GIT
For Linux
Open “TERMINAL” by Ctrl+Alt+T
Run the following command:
sudo apt-get install git-all
Your systems have this already installed. So skip this step for now.
Creating Github Account
1. Visit www.github.com
2. Create a username.
3. Enter your Email.
4. Choose your Password.
5. Confirm your Email by signing into your mail-account.
How to set-up GIT
Setup your username and email for all your commits.
git config --global user.name “username”
git config --global user.email “your@email.id”
Create A Repository
Firstly create a repo on github.com
Click on “+” sign on top right.
Select “New Repository”
Give your repository a Name and a Description.
We will need this repo later.
Now create a folder on your system with repo_name and initialize it as a repo.
mkdir repo_name
cd repo_name
Time to CODE
Create a new text file using gedit:
gedit hello.text
Write anything about yourself and Save Changes.
Similarly create 2 or more files and write something in it.
Checking the STATUS of your Working DIR
Use the following command to see what’s going on in your directory:
git status
This will list all the new files created and changes made to any previous files.
Next we will add these changes to the staging area.
ADD your Modifications
Use the following command to add or change a single file to staging area.
git add file_name
To add all files and changes at once to the staging area:
git add .
COMMIT your files
Now, you have worked on your Working Directory and its time to make changes to
your Repository.
git commit -m “my first code on github”
Note: This does not send your code to github.com Repository
The commit command just takes snapshot of your repo in staging area and stores
it. When you compare your project at two different commits, git uses snapshots to
list differences.
Time to PUSH
You are all set to make your changes available online.
Link your local repository with github (required only once):
git remote add http://github.com/username/repo_name.git
Now, your two repositories are linked but local repo is 1 commit ahead of github.
So, update your github repo to be publicly accessible.
git push -u origin master
Cloning your Repo
Copy the link of your Repo by clicking “Clone or Download” button under your
Repository.
Run the following command on terminal:
git clone http://www.github.com/username/reponame.git
Congo!!! Your Repo is now on your Local System.
Few more useful commands
1. git diff : This lists all changes in repo as compared to last commit.
2. git log : To see a list of all commits on your repo.
3. Fork : This is an important feature of github, where you can copy
someone’s repository in your account and then modify it as suitable.
4. git clone : Use this command to create a working directory on your local
system of your existing repo on github.
QUESTIONS PLEASE
...KEEP CODING
Your feedback is important to us:
gdgjss.in/?p=707

More Related Content

PPTX
PPTX
Introduction to git and github
PPTX
Extra bit with git
PDF
Advance workshop on git
PPTX
Git and github fundamentals
PPT
GIT By Sivakrishna
PPTX
Beginner's guide to git and github
PPTX
How to install and use git
Introduction to git and github
Extra bit with git
Advance workshop on git
Git and github fundamentals
GIT By Sivakrishna
Beginner's guide to git and github
How to install and use git

What's hot (20)

PPTX
A prentation on github
PPTX
HacktoberFest-Git&GitHub
PDF
Git 101 Workshop
PPTX
Git & GitHub
PPTX
Workshop on Git and GitHub
PDF
Git Version Control System
PDF
Git and GitHub
PPTX
PDF
Introduction to Git
PPTX
Git presentation
PPTX
Git tutorial
PPTX
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
ODP
Git presentation
PDF
Version Control Systems with git (and github) as an example
PPTX
Git n git hub
PPTX
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
PDF
Tài liệu sử dụng GitHub
PDF
Version Control System - Git
PDF
Github Case Study By Amil Ali
A prentation on github
HacktoberFest-Git&GitHub
Git 101 Workshop
Git & GitHub
Workshop on Git and GitHub
Git Version Control System
Git and GitHub
Introduction to Git
Git presentation
Git tutorial
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git presentation
Version Control Systems with git (and github) as an example
Git n git hub
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Tài liệu sử dụng GitHub
Version Control System - Git
Github Case Study By Amil Ali
Ad

Similar to Extra bit with git (20)

PDF
introductiontogitandgithub-120702044048-phpapp01.pdf
PPTX
Introduction to Git and Github
PDF
Getting started With GIT
PPTX
Introduction to Git and GitHub Part 1
PPTX
tech winter break workshop on git &git hub.pptx
PPTX
Github Session organized by GDG on campus SCOE.pptx
PPTX
Git and github
PPTX
Git and GitHub
PPTX
GitHub Event.pptx
PPTX
Git and GitHub Presentation of GDG on Campus UNSTPB
PDF
AIS Technical Development Workshop 3: Getting Started with Git and GitHub
PPTX
Git and GitHub Workshop of GDG on Campus UNSTPB
PDF
Version Control Systems Software Engineering
PPTX
Git and GitHub Workshop of GDG on Campus UNSTPB
PDF
PPTX
Git ritesh venture_pact
PDF
Github and Git What the fuck is this shit .pdf
PPTX
Git and Github
PPTX
Git and GitHub workshop of GDG on Campus UNSTPB
PPTX
git & git hub course in information retrieval .pptx
introductiontogitandgithub-120702044048-phpapp01.pdf
Introduction to Git and Github
Getting started With GIT
Introduction to Git and GitHub Part 1
tech winter break workshop on git &git hub.pptx
Github Session organized by GDG on campus SCOE.pptx
Git and github
Git and GitHub
GitHub Event.pptx
Git and GitHub Presentation of GDG on Campus UNSTPB
AIS Technical Development Workshop 3: Getting Started with Git and GitHub
Git and GitHub Workshop of GDG on Campus UNSTPB
Version Control Systems Software Engineering
Git and GitHub Workshop of GDG on Campus UNSTPB
Git ritesh venture_pact
Github and Git What the fuck is this shit .pdf
Git and Github
Git and GitHub workshop of GDG on Campus UNSTPB
git & git hub course in information retrieval .pptx
Ad

Recently uploaded (20)

PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
master seminar digital applications in india
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Institutional Correction lecture only . . .
PPTX
Lesson notes of climatology university.
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
Cell Types and Its function , kingdom of life
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Cell Structure & Organelles in detailed.
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Complications of Minimal Access Surgery at WLH
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
Microbial diseases, their pathogenesis and prophylaxis
master seminar digital applications in india
Anesthesia in Laparoscopic Surgery in India
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
102 student loan defaulters named and shamed – Is someone you know on the list?
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Institutional Correction lecture only . . .
Lesson notes of climatology university.
human mycosis Human fungal infections are called human mycosis..pptx
Sports Quiz easy sports quiz sports quiz
Cell Types and Its function , kingdom of life
Abdominal Access Techniques with Prof. Dr. R K Mishra
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Cell Structure & Organelles in detailed.
GDM (1) (1).pptx small presentation for students
Complications of Minimal Access Surgery at WLH
Insiders guide to clinical Medicine.pdf
Renaissance Architecture: A Journey from Faith to Humanism

Extra bit with git

  • 2. OPEN SOURCE It denotes the software for which the original source code is made freely available and may be redistributed and modified
  • 3. WHAT IS GIT Git is a free and distributed version control and source code management system with an emphasis on speed and efficiency. WHAT IS GITHUB ● Github is a web based Git repository hosting service which offers all version control functionality of git and adds some features of its own
  • 4. Repository A repository is a collection of all the project files and it also stores each file’s revision history. REPOSITORY & WORKING DIRECTORY Working Directory The working directory is the place where all the files of your repository are located.
  • 5. WHAT WE WILL LEARN Understanding Version Control System Basic git functionality Create your open-source project Contribute to others projects
  • 6. TOPICS WHICH WE WILL COVER Installing GIT on local system Creating a REPOSITORY (repo) How to CLONE a Repo How to COMMIT and Push in a Repo Basics of FORKing a Repo
  • 7. WORKFLOW OF GIT Make changes in your Working Directory. Add your changes to Staging Area. Commit your changes to Repository. Push your code to Github.
  • 8. Installing GIT For Linux Open “TERMINAL” by Ctrl+Alt+T Run the following command: sudo apt-get install git-all Your systems have this already installed. So skip this step for now.
  • 9. Creating Github Account 1. Visit www.github.com 2. Create a username. 3. Enter your Email. 4. Choose your Password. 5. Confirm your Email by signing into your mail-account.
  • 10. How to set-up GIT Setup your username and email for all your commits. git config --global user.name “username” git config --global user.email “your@email.id”
  • 11. Create A Repository Firstly create a repo on github.com Click on “+” sign on top right. Select “New Repository” Give your repository a Name and a Description. We will need this repo later. Now create a folder on your system with repo_name and initialize it as a repo. mkdir repo_name cd repo_name
  • 12. Time to CODE Create a new text file using gedit: gedit hello.text Write anything about yourself and Save Changes. Similarly create 2 or more files and write something in it.
  • 13. Checking the STATUS of your Working DIR Use the following command to see what’s going on in your directory: git status This will list all the new files created and changes made to any previous files. Next we will add these changes to the staging area.
  • 14. ADD your Modifications Use the following command to add or change a single file to staging area. git add file_name To add all files and changes at once to the staging area: git add .
  • 15. COMMIT your files Now, you have worked on your Working Directory and its time to make changes to your Repository. git commit -m “my first code on github” Note: This does not send your code to github.com Repository The commit command just takes snapshot of your repo in staging area and stores it. When you compare your project at two different commits, git uses snapshots to list differences.
  • 16. Time to PUSH You are all set to make your changes available online. Link your local repository with github (required only once): git remote add http://github.com/username/repo_name.git Now, your two repositories are linked but local repo is 1 commit ahead of github. So, update your github repo to be publicly accessible. git push -u origin master
  • 17. Cloning your Repo Copy the link of your Repo by clicking “Clone or Download” button under your Repository. Run the following command on terminal: git clone http://www.github.com/username/reponame.git Congo!!! Your Repo is now on your Local System.
  • 18. Few more useful commands 1. git diff : This lists all changes in repo as compared to last commit. 2. git log : To see a list of all commits on your repo. 3. Fork : This is an important feature of github, where you can copy someone’s repository in your account and then modify it as suitable. 4. git clone : Use this command to create a working directory on your local system of your existing repo on github.
  • 19. QUESTIONS PLEASE ...KEEP CODING Your feedback is important to us: gdgjss.in/?p=707

Editor's Notes