SlideShare a Scribd company logo
Git-GITHUB
Beginner’s Tutorial
Anurag Deb Roy
HUB4TECHIE.COM
Hub4techie.com Anurag Deb Roy
What is Git:
Git is a version control system, a tool to manage your source code history.
I.e. to track all the changes made to the file.
"Git is a free and open source distributed version control system designed to handle
everything from small to very large projects with speed and efficiency"
Centralized vs Distributed Version Control System
Drawbacks : If anything happens in central repository, we don’t have any backup.
Distributed Version Control System
Hub4techie.com Anurag Deb Roy
Backup is made in local repository.
Only need to be online when changes are committed to main server.
What is GitHub:
GitHub is a hosting service for Git repositories.
"GitHub is a web-based Git repository hosting service, which offers all of the distributed
revision control and source code management (SCM) functionality of Git as well as adding
its own features."
Github provides access control and several collaboration features such as wikis, task
management, and bug tracking and feature requests for every project.
You do not need GitHub to use Git.
GitHub (and any other local, remote or hosted system) can all be peers in the same
distributed versioned repositories within a single project.
Github allows you to:
● Share your repositories with others.
● Access other user's repositories.
Hub4techie.com Anurag Deb Roy
● Store remote copies of your repositories (github servers) as backup of your local
copies.
Architecture
Privileges/Access Levels
Owner
Has full administrative access to the entire organization.
Member
Can see every member and non-secret team in the organization, and can create new
repositories.
Let’s Start workingwith Git commandLine
$ git --version
git version 2.16.2.windows.1
Now we need to set up some global configuration.
Why Important ?
Because if you are working with other developers then everybody needs to know who is
checking in & out or making the changes.
$ git config --global user.name "Anurag Deb"
$ git config --global user.email "anuragdeb8@gmail.com"
To check all the configurations done
$ git config --list
core.symlinks=false
Hub4techie.com Anurag Deb Roy
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
rebase.autosquash=true
http.sslcainfo=E:/Git_Install/mingw64/ssl/certs/ca-bundle.crt
http.sslbackend=openssl
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
user.name=Anurag Deb
user.email=anuragdeb8@gmail.com
NEED Help ?
git help <verb>
Ex : git help config Or
git <verb> --help
Ex : git config --help // git-config.html will open
Hub4techie.com Anurag Deb Roy
Getting Started
Two common Scenarios :
1) Existing Project/Repo
2) New Project/Repo
A new repo from scratch
Say you’ve just got some data from a collaborator and are about to start exploring it.
● Create a directory to contain the project.
● Type git init // initialized empty GIT repository in .folder path
● git status // nothing to commit
● dir > test1.txt //Creates text file
Ignore some files if you don’t want to track those files.
$ touch .gitignore
Edit .gitignore
.Project //any folder you don’t to track
*.bat //any file you don’t to track
After adding check git status.
Where are you now?
Working Directory : you are working right now.
Staging Area : We organise what we want to commit to our repository
Repository : Local repository
Hub4techie.com Anurag Deb Roy
Lets Start
● Type git add to add the files so that we start tracking the files
● Type git add -A // to add all files
● Type git commit
But it’s good to add messages while doing commit.
Use git commit -m “message”
Mukta@Mukta-PC MINGW64 /E/Study/GitTuts/LocalRepo (master)
$ git commit -m "Initial commit"
[master (root-commit) 964b9f5] Initial commit
3 files changed, 212 insertions(+)
create mode 100644 .gitignore
create mode 100644 ShellScript.sh
create mode 100644 ShellScriptFile2.sh
$ git status
On branch master
nothing to commit, working tree clean
$ git log
commit 964b9f51604c8bdf854a47d7f6ba497e64015b58 (HEAD -> master)
Author: Anurag Deb <anuragdeb8@gmail.com>
Date: Sat Mar 24 23:42:18 2018 +0530
Initial commit
Second Scenario : Existing Repository
$ git clone <url> <where to clone>
$ git clone ../remote_repo.git .
$ git clone https://github.com/anuragdeb3/Loadbuster .
Viewing Information aboutthe remote repository
Hub4techie.com Anurag Deb Roy
$ git remote -v
$ git branch -a
Pushing Changes (After Some changes to the code)
git diff
git status
git add -A
git commit -m “added some print lines”
While we were working on our code there might have been changes in the files done by some other
developers, That’s why we need to pull first then push the code.
$ git pull origin master
Will pull any changes from the last time we did the pull operation.
Origin : is the remote repository.
Master : It is the branch where we want to push to.
For now we have worked with local and remote repositories.
Let us Check out the workflow
Common Workflow
For now we were directly working on the master branch.
Branching is the way to work on different versions of a repository at one time.
By default your repository has one branch named master which is considered to be the definitive
branch. We use branches to experiment and make edits before committing them to master.
When you create a branch off the master branch, you’re making a copy, or snapshot, of master as it
was at that point in time. If someone else made changes to the master branch while you were
working on your branch, you could pull in those updates.
Create A Branch For Desired Feature
$ git branch scriptEdits
$ git branch // lists all local branches
* master // * means the current branch we are working on
Hub4techie.com Anurag Deb Roy
scriptEdits // if you want to work on another branch you need to checkout to that branch
$ git checkout scriptEdits
Switched to branch 'scriptEdits'
$ git branch
Do some changes to script and changes will be done only to branch not master
$ git status
On branch scriptEdits
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: Buster.sh
no changes added to commit (use "git add" and/or "git commit -a")
$ git add -A
$ git status
On branch scriptEdits
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: Buster.sh
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: Buster.sh
$ git commit -m "made changes to exit function"
[scriptEdits 757f2d9] made changes to exit function
1 file changed, 2 insertions(+)
After CommitPush Branch To Remote
Hub4techie.com Anurag Deb Roy
$ git push -u origin scriptEdits
-u is for set upstream i.e. associate our local branch with the remote branch
$ git branch -a
master
* scriptEdits
remotes/origin/HEAD -> origin/master //pointer to the master
remotes/origin/master
remotes/origin/scriptEdits
After all unit tests we can Merge A Branch
$ git branch -a
master
* scriptEdits
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/scriptEdits
$ git checkout master
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
$ git branch
* master
scriptEdits
$ git pull origin master
From https://github.com/anuragdeb3/Loadbuster
* branch master -> FETCH_HEAD
Already up to date.
Hub4techie.com Anurag Deb Roy
$ git branch --merged
* master // showing only master as other branches have not been merged yet
$ git merge scriptEdits
Updating 757f2d9..efe5a10
Fast-forward
Buster.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
$ git push origin master
Username for 'https://github.com': anuragdeb3
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/anuragdeb3/Loadbuster
6d7f7e5..efe5a10 master -> master
Delete a Branch
$ git branch --merged
$ git branch -d scriptEdits
$ git branch -a
$ git push origin --delete scriptEdits
Download :https://git-scm.com/download/win
Chrome Previous Releases : https://www.slimjet.com/chrome/google-chrome-old-version.php
Ad

More Related Content

What's hot (20)

Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
Roland Emmanuel Salunga
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
Somkiat Puisungnoen
 
Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshare
Rakesh Sukumar
 
Sử dụng GIT cho người mới bắt đầu (Tiếng Việt)
Sử dụng GIT cho người mới bắt đầu (Tiếng Việt)Sử dụng GIT cho người mới bắt đầu (Tiếng Việt)
Sử dụng GIT cho người mới bắt đầu (Tiếng Việt)
Thanh Bùi
 
Git Branching Model
Git Branching ModelGit Branching Model
Git Branching Model
Harun Yardımcı
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Rueful Robin
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
Anurag Upadhaya
 
Git Terminologies
Git TerminologiesGit Terminologies
Git Terminologies
Yash
 
Técnicas avanzadas de control de versiones
Técnicas avanzadas de control de versionesTécnicas avanzadas de control de versiones
Técnicas avanzadas de control de versiones
Angel Armenta
 
Git advanced
Git advancedGit advanced
Git advanced
Peter Vandenabeele
 
Introduction to git & GitHub
Introduction to git & GitHubIntroduction to git & GitHub
Introduction to git & GitHub
Poornachandrakashi
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
Naveen Pandey
 
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowGit Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-Flow
Mikhail Melnik
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
E Carter
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
David Paluy
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
Venkat Malladi
 
Source Code Management systems
Source Code Management systemsSource Code Management systems
Source Code Management systems
xSawyer
 
Git real slides
Git real slidesGit real slides
Git real slides
Lucas Couto
 
A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model
abodeltae
 
A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
Vivek Parihar
 
Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshare
Rakesh Sukumar
 
Sử dụng GIT cho người mới bắt đầu (Tiếng Việt)
Sử dụng GIT cho người mới bắt đầu (Tiếng Việt)Sử dụng GIT cho người mới bắt đầu (Tiếng Việt)
Sử dụng GIT cho người mới bắt đầu (Tiếng Việt)
Thanh Bùi
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Rueful Robin
 
Git Terminologies
Git TerminologiesGit Terminologies
Git Terminologies
Yash
 
Técnicas avanzadas de control de versiones
Técnicas avanzadas de control de versionesTécnicas avanzadas de control de versiones
Técnicas avanzadas de control de versiones
Angel Armenta
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
Naveen Pandey
 
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowGit Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-Flow
Mikhail Melnik
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
E Carter
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
David Paluy
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
Venkat Malladi
 
Source Code Management systems
Source Code Management systemsSource Code Management systems
Source Code Management systems
xSawyer
 
A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model
abodeltae
 
A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
Vivek Parihar
 

Similar to Git github (20)

Introduction To Git Workshop
Introduction To Git WorkshopIntroduction To Git Workshop
Introduction To Git Workshop
themystic_ca
 
Git learning
Git learningGit learning
Git learning
Amit Gupta
 
Git training v10
Git training v10Git training v10
Git training v10
Skander Hamza
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHub
DSC GVP
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
David Newbury
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
Nyros Technologies
 
Git and Github
Git and GithubGit and Github
Git and Github
Teodora Ahkozidou
 
Collaborative development with Git | Workshop
Collaborative development with Git | WorkshopCollaborative development with Git | Workshop
Collaborative development with Git | Workshop
Anuchit Chalothorn
 
Git and github
Git and githubGit and github
Git and github
Teodora Ahkozidou
 
Pro git - grasping it conceptually
Pro git - grasping it conceptuallyPro git - grasping it conceptually
Pro git - grasping it conceptually
seungzzang Kim
 
git2nvlkndvslnvdslnlknvdlnlvdsnlknsdvlkn.ppt
git2nvlkndvslnvdslnlknvdlnlvdsnlknsdvlkn.pptgit2nvlkndvslnvdslnlknvdlnlvdsnlknsdvlkn.ppt
git2nvlkndvslnvdslnlknvdlnlvdsnlknsdvlkn.ppt
loleto7559
 
GIT in a nutshell
GIT in a nutshellGIT in a nutshell
GIT in a nutshell
alignan
 
Git introduction
Git introductionGit introduction
Git introduction
satyendrajaladi
 
Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?
9 series
 
Git and GitHUB Explanation and simple coding for CLI
Git and GitHUB Explanation and simple coding for CLIGit and GitHUB Explanation and simple coding for CLI
Git and GitHUB Explanation and simple coding for CLI
kumaresan7751
 
Git workflows automat-it
Git workflows automat-itGit workflows automat-it
Git workflows automat-it
Automat-IT
 
Gn unify git
Gn unify gitGn unify git
Gn unify git
Priyanka Nag
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
AbelPhilipJoseph
 
Version Control Systems Software Engineering
Version Control Systems Software EngineeringVersion Control Systems Software Engineering
Version Control Systems Software Engineering
ssuser1c86e3
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
mobaires
 
Introduction To Git Workshop
Introduction To Git WorkshopIntroduction To Git Workshop
Introduction To Git Workshop
themystic_ca
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHub
DSC GVP
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
David Newbury
 
Collaborative development with Git | Workshop
Collaborative development with Git | WorkshopCollaborative development with Git | Workshop
Collaborative development with Git | Workshop
Anuchit Chalothorn
 
Pro git - grasping it conceptually
Pro git - grasping it conceptuallyPro git - grasping it conceptually
Pro git - grasping it conceptually
seungzzang Kim
 
git2nvlkndvslnvdslnlknvdlnlvdsnlknsdvlkn.ppt
git2nvlkndvslnvdslnlknvdlnlvdsnlknsdvlkn.pptgit2nvlkndvslnvdslnlknvdlnlvdsnlknsdvlkn.ppt
git2nvlkndvslnvdslnlknvdlnlvdsnlknsdvlkn.ppt
loleto7559
 
GIT in a nutshell
GIT in a nutshellGIT in a nutshell
GIT in a nutshell
alignan
 
Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?
9 series
 
Git and GitHUB Explanation and simple coding for CLI
Git and GitHUB Explanation and simple coding for CLIGit and GitHUB Explanation and simple coding for CLI
Git and GitHUB Explanation and simple coding for CLI
kumaresan7751
 
Git workflows automat-it
Git workflows automat-itGit workflows automat-it
Git workflows automat-it
Automat-IT
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
AbelPhilipJoseph
 
Version Control Systems Software Engineering
Version Control Systems Software EngineeringVersion Control Systems Software Engineering
Version Control Systems Software Engineering
ssuser1c86e3
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
mobaires
 
Ad

More from Anurag Deb (8)

Open Script (OATS)
Open Script (OATS)Open Script (OATS)
Open Script (OATS)
Anurag Deb
 
Tutorials on Macro
Tutorials on MacroTutorials on Macro
Tutorials on Macro
Anurag Deb
 
letter of appreciation 2
letter of appreciation 2letter of appreciation 2
letter of appreciation 2
Anurag Deb
 
letter of appreciation 1
letter of appreciation 1letter of appreciation 1
letter of appreciation 1
Anurag Deb
 
Article on The Electronic Health Record
Article on The Electronic Health RecordArticle on The Electronic Health Record
Article on The Electronic Health Record
Anurag Deb
 
Electronic health records
Electronic health recordsElectronic health records
Electronic health records
Anurag Deb
 
Let me design
Let me designLet me design
Let me design
Anurag Deb
 
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Anurag Deb
 
Open Script (OATS)
Open Script (OATS)Open Script (OATS)
Open Script (OATS)
Anurag Deb
 
Tutorials on Macro
Tutorials on MacroTutorials on Macro
Tutorials on Macro
Anurag Deb
 
letter of appreciation 2
letter of appreciation 2letter of appreciation 2
letter of appreciation 2
Anurag Deb
 
letter of appreciation 1
letter of appreciation 1letter of appreciation 1
letter of appreciation 1
Anurag Deb
 
Article on The Electronic Health Record
Article on The Electronic Health RecordArticle on The Electronic Health Record
Article on The Electronic Health Record
Anurag Deb
 
Electronic health records
Electronic health recordsElectronic health records
Electronic health records
Anurag Deb
 
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Virtual Memory In Contemporary Microprocessors And 64-Bit Microprocessors Arc...
Anurag Deb
 
Ad

Recently uploaded (20)

Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Operations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdfOperations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdf
Arab Academy for Science, Technology and Maritime Transport
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 

Git github

  • 2. Hub4techie.com Anurag Deb Roy What is Git: Git is a version control system, a tool to manage your source code history. I.e. to track all the changes made to the file. "Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency" Centralized vs Distributed Version Control System Drawbacks : If anything happens in central repository, we don’t have any backup. Distributed Version Control System
  • 3. Hub4techie.com Anurag Deb Roy Backup is made in local repository. Only need to be online when changes are committed to main server. What is GitHub: GitHub is a hosting service for Git repositories. "GitHub is a web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features." Github provides access control and several collaboration features such as wikis, task management, and bug tracking and feature requests for every project. You do not need GitHub to use Git. GitHub (and any other local, remote or hosted system) can all be peers in the same distributed versioned repositories within a single project. Github allows you to: ● Share your repositories with others. ● Access other user's repositories.
  • 4. Hub4techie.com Anurag Deb Roy ● Store remote copies of your repositories (github servers) as backup of your local copies. Architecture Privileges/Access Levels Owner Has full administrative access to the entire organization. Member Can see every member and non-secret team in the organization, and can create new repositories. Let’s Start workingwith Git commandLine $ git --version git version 2.16.2.windows.1 Now we need to set up some global configuration. Why Important ? Because if you are working with other developers then everybody needs to know who is checking in & out or making the changes. $ git config --global user.name "Anurag Deb" $ git config --global user.email "[email protected]" To check all the configurations done $ git config --list core.symlinks=false
  • 5. Hub4techie.com Anurag Deb Roy core.autocrlf=true core.fscache=true color.diff=auto color.status=auto color.branch=auto color.interactive=true help.format=html rebase.autosquash=true http.sslcainfo=E:/Git_Install/mingw64/ssl/certs/ca-bundle.crt http.sslbackend=openssl diff.astextplain.textconv=astextplain filter.lfs.clean=git-lfs clean -- %f filter.lfs.smudge=git-lfs smudge -- %f filter.lfs.process=git-lfs filter-process filter.lfs.required=true user.name=Anurag Deb [email protected] NEED Help ? git help <verb> Ex : git help config Or git <verb> --help Ex : git config --help // git-config.html will open
  • 6. Hub4techie.com Anurag Deb Roy Getting Started Two common Scenarios : 1) Existing Project/Repo 2) New Project/Repo A new repo from scratch Say you’ve just got some data from a collaborator and are about to start exploring it. ● Create a directory to contain the project. ● Type git init // initialized empty GIT repository in .folder path ● git status // nothing to commit ● dir > test1.txt //Creates text file Ignore some files if you don’t want to track those files. $ touch .gitignore Edit .gitignore .Project //any folder you don’t to track *.bat //any file you don’t to track After adding check git status. Where are you now? Working Directory : you are working right now. Staging Area : We organise what we want to commit to our repository Repository : Local repository
  • 7. Hub4techie.com Anurag Deb Roy Lets Start ● Type git add to add the files so that we start tracking the files ● Type git add -A // to add all files ● Type git commit But it’s good to add messages while doing commit. Use git commit -m “message” Mukta@Mukta-PC MINGW64 /E/Study/GitTuts/LocalRepo (master) $ git commit -m "Initial commit" [master (root-commit) 964b9f5] Initial commit 3 files changed, 212 insertions(+) create mode 100644 .gitignore create mode 100644 ShellScript.sh create mode 100644 ShellScriptFile2.sh $ git status On branch master nothing to commit, working tree clean $ git log commit 964b9f51604c8bdf854a47d7f6ba497e64015b58 (HEAD -> master) Author: Anurag Deb <[email protected]> Date: Sat Mar 24 23:42:18 2018 +0530 Initial commit Second Scenario : Existing Repository $ git clone <url> <where to clone> $ git clone ../remote_repo.git . $ git clone https://github.com/anuragdeb3/Loadbuster . Viewing Information aboutthe remote repository
  • 8. Hub4techie.com Anurag Deb Roy $ git remote -v $ git branch -a Pushing Changes (After Some changes to the code) git diff git status git add -A git commit -m “added some print lines” While we were working on our code there might have been changes in the files done by some other developers, That’s why we need to pull first then push the code. $ git pull origin master Will pull any changes from the last time we did the pull operation. Origin : is the remote repository. Master : It is the branch where we want to push to. For now we have worked with local and remote repositories. Let us Check out the workflow Common Workflow For now we were directly working on the master branch. Branching is the way to work on different versions of a repository at one time. By default your repository has one branch named master which is considered to be the definitive branch. We use branches to experiment and make edits before committing them to master. When you create a branch off the master branch, you’re making a copy, or snapshot, of master as it was at that point in time. If someone else made changes to the master branch while you were working on your branch, you could pull in those updates. Create A Branch For Desired Feature $ git branch scriptEdits $ git branch // lists all local branches * master // * means the current branch we are working on
  • 9. Hub4techie.com Anurag Deb Roy scriptEdits // if you want to work on another branch you need to checkout to that branch $ git checkout scriptEdits Switched to branch 'scriptEdits' $ git branch Do some changes to script and changes will be done only to branch not master $ git status On branch scriptEdits Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: Buster.sh no changes added to commit (use "git add" and/or "git commit -a") $ git add -A $ git status On branch scriptEdits Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: Buster.sh Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: Buster.sh $ git commit -m "made changes to exit function" [scriptEdits 757f2d9] made changes to exit function 1 file changed, 2 insertions(+) After CommitPush Branch To Remote
  • 10. Hub4techie.com Anurag Deb Roy $ git push -u origin scriptEdits -u is for set upstream i.e. associate our local branch with the remote branch $ git branch -a master * scriptEdits remotes/origin/HEAD -> origin/master //pointer to the master remotes/origin/master remotes/origin/scriptEdits After all unit tests we can Merge A Branch $ git branch -a master * scriptEdits remotes/origin/HEAD -> origin/master remotes/origin/master remotes/origin/scriptEdits $ git checkout master Switched to branch 'master' Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits) $ git branch * master scriptEdits $ git pull origin master From https://github.com/anuragdeb3/Loadbuster * branch master -> FETCH_HEAD Already up to date.
  • 11. Hub4techie.com Anurag Deb Roy $ git branch --merged * master // showing only master as other branches have not been merged yet $ git merge scriptEdits Updating 757f2d9..efe5a10 Fast-forward Buster.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) $ git push origin master Username for 'https://github.com': anuragdeb3 Total 0 (delta 0), reused 0 (delta 0) To https://github.com/anuragdeb3/Loadbuster 6d7f7e5..efe5a10 master -> master Delete a Branch $ git branch --merged $ git branch -d scriptEdits $ git branch -a $ git push origin --delete scriptEdits Download :https://git-scm.com/download/win Chrome Previous Releases : https://www.slimjet.com/chrome/google-chrome-old-version.php