SlideShare a Scribd company logo
GIT Fundamentals & Features
Presenter: Naincy Gupta
Mindfire Solutions
About Me
Certifications:
M70 101 - Magento Certified Developer
OCA 870 - MYSQL
Contact Me:
Email: naincy.gupta@mindfiresolutions.com
Skype: mfsi_naincy.gupta
Connect Me: -
Facebook : https://www.facebook.com/naincy.gupta.35574
LinkedIn : in.linkedin.com/pub/naincy-gupta/66/440/6a3/
Google+: https://plus.google.com/u/0/+NaincyGuptaTechSharing/posts
Blog: http://naincygupta@wordpress.com
Contents
 GIT
 Types of VCS
 Basic Fundamentals
 GIT Usage
 Workflows of GIT
 GIT Stash
 Code Quality
 Why GIT make you happy?
 Git is nothing but a SCM tool.
 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.
 Git is easy to learn and has a tiny footprint with lightning fast
performance.
Centralized Distributed
Central, authoritative repository Everyone has its own repository
All changes saved in one single location Get safety without having worry about
'breaking the build'
Client-Server approach One can change in repository and those
changes will be local to them unless they
synchronize with someone else.
Is this true?
Start with GIT
 Install GIT client
- sudo apt-get install git (linux)
- brew install git (MAC)
 Check if git is installed or not
$ git –version
 Set username and email to your git config
$ git config --global user.name “Naincy”
$ git config --global user.email “nansee1804@gmail.com”
$ git config –list (will allow you to verify the username and email)
GIT Fundamentals
Creating a repository (if it does not exist remotely)
$ git init (follow http://git-scm.com/docs/git-init for more information)
Cloning a remote repository:
$ git clone http[s]://host.xz[:port]/path/to/repo.git/
(Inspecting a repo: $ vim .git/config)
Inspecting repo:
$ git status [Difference b/w index file and current head commit]
$ git log [Sow list of all commit with commit message]
$ git log -1 [Show top 1st commit]
$ git log - -pretty=oneline [Show list of all commit in single line]
Branch Operations:
$ git branch <branch_name> OR git checkout -b <branch_name> [will
create new branch for you]
$ git branch -D <bramch_name> [allows you to delete branch]
$ git branch -m <old_branch_name> <new_branch_name> [will remane the
branch name from old to new]
$ git checkout <branch_name> [allows to switch to other branch]
$ git log - -pretty=oneline [Show list of all commit in single line]
Making edit and commiting
$ git diff [will show delta difference code of current master HEAD and current index]
$ git status [will show path of file as “Changes not staged for commit”]
$ git add (-A) [will show file as “Changes to be commited”]
$ git commit -m [write your commit message. Save and exit] {file changed, insertion, deletion}
Check your commit by $ git log
Send changes to server
$ git push <branch_name> [will push your all local changes to the server]
$ git pull <branch_name> [will pull all changes from server to your local]
Recover your changes that you have added by mistakes
$ git add <file name> [file <file name> that you have added by mistake]
$ git status
$ git reset HEAD <filename>
$ git checkout - - <filename>
Merge one branch to another
$ git merge branch2 [you are in branch 1 and merging branch2]
If you get conflicts, then can resolve with mergetool which provides a GUI interface to resolve conflicts.
$ git mergetool
GIT WorkFlows
GIT Stash
Will allow you to save your changes without commiting them
$ git stash save 'message' [save your change as a seperte stash@{*} branch with
commit message]
$ git stash list [will show you list of all stash with commit message]
$ git show <stash@{0}>
[will show you what code difference contain this this stash@{0}]
$ git apply <stash@{0}> [will allow to apply change in current branch]
Code Quality
 Fast and Compact
 Freedom and Safety
 Explore and Understand
 Control and Assemble
 Enforce Discipline: manages process by which control of items
passes from one another.
 Archive Version: can store subsequent versions of source
control items. Also maintain lot of historical data like author,
date, time, etc.
 Enable Collaboration: easy sharing of files and docs
 Recover from accidental deletion: can easily swith to
working copy.
QUESTIONS..??
Mail me your questions at nansee1804@gmail.com
Thank You..!!

More Related Content

What's hot

Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash Course
Nilay Binjola
 
Git learning
Git learningGit learning
Git learning
Amit Gupta
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
Pham Quy (Jack)
 
Git Introductive
Git IntroductiveGit Introductive
Git Introductive
Adham Saad
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
Arulmurugan Rajaraman
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
Shilu Shrestha
 
Git Basics at Rails Underground
Git Basics at Rails UndergroundGit Basics at Rails Underground
Git Basics at Rails Underground
Ariejan de Vroom
 
Git basics
Git basicsGit basics
Git basics
GHARSALLAH Mohamed
 
Git 101
Git 101Git 101
Git 101
jayrparro
 
A Practical Introduction to git
A Practical Introduction to gitA Practical Introduction to git
A Practical Introduction to git
Emanuele Olivetti
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Yan Vugenfirer
 
Git: basic to advanced
Git: basic to advancedGit: basic to advanced
Git: basic to advanced
Yodalee
 
Version Control History and Git Basics
Version Control History and Git BasicsVersion Control History and Git Basics
Version Control History and Git Basics
Sreedath N S
 
Git presentation
Git presentationGit presentation
Git presentation
Vikas Yaligar
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
mobaires
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of Git
DivineOmega
 
From svn to git
From svn to gitFrom svn to git
From svn to git
Nehal Shah
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
Elli Kanal
 
Talk to git
Talk to gitTalk to git
Talk to git
YenTing Chen
 
Learn Git Basics
Learn Git BasicsLearn Git Basics
Learn Git Basics
Prakash Dantuluri
 

What's hot (20)

Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash Course
 
Git learning
Git learningGit learning
Git learning
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
Git Introductive
Git IntroductiveGit Introductive
Git Introductive
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Git Basics at Rails Underground
Git Basics at Rails UndergroundGit Basics at Rails Underground
Git Basics at Rails Underground
 
Git basics
Git basicsGit basics
Git basics
 
Git 101
Git 101Git 101
Git 101
 
A Practical Introduction to git
A Practical Introduction to gitA Practical Introduction to git
A Practical Introduction to git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git: basic to advanced
Git: basic to advancedGit: basic to advanced
Git: basic to advanced
 
Version Control History and Git Basics
Version Control History and Git BasicsVersion Control History and Git Basics
Version Control History and Git Basics
 
Git presentation
Git presentationGit presentation
Git presentation
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of Git
 
From svn to git
From svn to gitFrom svn to git
From svn to git
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
Talk to git
Talk to gitTalk to git
Talk to git
 
Learn Git Basics
Learn Git BasicsLearn Git Basics
Learn Git Basics
 

Viewers also liked

RestFul Api documentation with Swagger
RestFul Api documentation with SwaggerRestFul Api documentation with Swagger
RestFul Api documentation with Swagger
Naincy Gupta
 
Sunny Side Up 3
Sunny Side Up 3Sunny Side Up 3
Sunny Side Up 3
EmilyProfero
 
Experince latter1
Experince  latter1Experince  latter1
Experince latter1Ummar Ahmad
 
Projet Bd
Projet BdProjet Bd
Projet BdsebT4
 
CRUCIGRAMA
CRUCIGRAMA CRUCIGRAMA
CRUCIGRAMA
BaronyBarreto
 
Answer garden
Answer gardenAnswer garden
Answer garden
Andromachi Pieridou
 
2016 resume
2016 resume2016 resume
2016 resume
Ron Washington
 
Come ti riciclo
Come ti ricicloCome ti riciclo
Come ti riciclo
Gianluca Pegoraro
 
Distributors Action plan
Distributors Action planDistributors Action plan
Distributors Action plan
Samir Mohammed
 
Habilidades y valores plan de vida y carrera TecM
Habilidades y valores plan de vida y carrera TecMHabilidades y valores plan de vida y carrera TecM
Habilidades y valores plan de vida y carrera TecM
Maestros Online
 
SMART TOOLS: DISSECT, DIGEST AND DELIVER BIG DATA from Structure:Data 2012
SMART TOOLS: DISSECT, DIGEST AND DELIVER BIG DATA from Structure:Data 2012SMART TOOLS: DISSECT, DIGEST AND DELIVER BIG DATA from Structure:Data 2012
SMART TOOLS: DISSECT, DIGEST AND DELIVER BIG DATA from Structure:Data 2012
Gigaom
 
ICT Presentation
ICT PresentationICT Presentation
ICT Presentation
Dawn Sawyers
 
Guerra fría crisis en berlin
Guerra fría crisis en berlinGuerra fría crisis en berlin
Guerra fría crisis en berlin
Katia Roman
 
Material y suturas quirúrgicas
Material y suturas quirúrgicasMaterial y suturas quirúrgicas
Material y suturas quirúrgicas
Universidad de Guadalajara
 
Proyecto de vida coe
Proyecto de vida coeProyecto de vida coe
Proyecto de vida coe
sanje3112
 

Viewers also liked (17)

RestFul Api documentation with Swagger
RestFul Api documentation with SwaggerRestFul Api documentation with Swagger
RestFul Api documentation with Swagger
 
Sunny Side Up 3
Sunny Side Up 3Sunny Side Up 3
Sunny Side Up 3
 
Experince latter1
Experince  latter1Experince  latter1
Experince latter1
 
Projet Bd
Projet BdProjet Bd
Projet Bd
 
CRUCIGRAMA
CRUCIGRAMA CRUCIGRAMA
CRUCIGRAMA
 
Answer garden
Answer gardenAnswer garden
Answer garden
 
2016 resume
2016 resume2016 resume
2016 resume
 
Come ti riciclo
Come ti ricicloCome ti riciclo
Come ti riciclo
 
Presentación1
Presentación1Presentación1
Presentación1
 
DEGREE
DEGREEDEGREE
DEGREE
 
Distributors Action plan
Distributors Action planDistributors Action plan
Distributors Action plan
 
Habilidades y valores plan de vida y carrera TecM
Habilidades y valores plan de vida y carrera TecMHabilidades y valores plan de vida y carrera TecM
Habilidades y valores plan de vida y carrera TecM
 
SMART TOOLS: DISSECT, DIGEST AND DELIVER BIG DATA from Structure:Data 2012
SMART TOOLS: DISSECT, DIGEST AND DELIVER BIG DATA from Structure:Data 2012SMART TOOLS: DISSECT, DIGEST AND DELIVER BIG DATA from Structure:Data 2012
SMART TOOLS: DISSECT, DIGEST AND DELIVER BIG DATA from Structure:Data 2012
 
ICT Presentation
ICT PresentationICT Presentation
ICT Presentation
 
Guerra fría crisis en berlin
Guerra fría crisis en berlinGuerra fría crisis en berlin
Guerra fría crisis en berlin
 
Material y suturas quirúrgicas
Material y suturas quirúrgicasMaterial y suturas quirúrgicas
Material y suturas quirúrgicas
 
Proyecto de vida coe
Proyecto de vida coeProyecto de vida coe
Proyecto de vida coe
 

Similar to Git and fundamentals

Git github
Git githubGit github
Git github
Anurag Deb
 
Git and Github
Git and GithubGit and Github
Git and Github
Teodora Ahkozidou
 
Git and github
Git and githubGit and github
Git and github
Teodora Ahkozidou
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
Nyros Technologies
 
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
 
Git cheat sheet_dark
Git cheat sheet_darkGit cheat sheet_dark
Git cheat sheet_dark
King Hom
 
Git cheat sheet__white
Git cheat sheet__whiteGit cheat sheet__white
Git cheat sheet__white
King Hom
 
Git cheat sheet__grey
Git cheat sheet__greyGit cheat sheet__grey
Git cheat sheet__grey
King Hom
 
Learning Basic GIT Cmd
Learning Basic GIT CmdLearning Basic GIT Cmd
Learning Basic GIT Cmd
srinathcox
 
Git 101
Git 101Git 101
Git Memento of basic commands
Git Memento of basic commandsGit Memento of basic commands
Git Memento of basic commands
Zakaria Bouazza
 
Advanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with GitAdvanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with Git
Rasan Samarasinghe
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
Ahmed Fathallah
 
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 Developer Cheatsheet
Git Developer CheatsheetGit Developer Cheatsheet
Git Developer Cheatsheet
Abdul Basit
 
SVN 2 Git
SVN 2 GitSVN 2 Git
SVN 2 Git
Marco De Stefano
 
Git introduction
Git introductionGit introduction
Git introduction
satyendrajaladi
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
Md Atique Ahmed Ziad
 
Git
GitGit
Working in Team using Git in Unity
Working in Team using Git in UnityWorking in Team using Git in Unity
Working in Team using Git in Unity
Rifauddin Tsalitsy
 

Similar to Git and fundamentals (20)

Git github
Git githubGit github
Git github
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Git and github
Git and githubGit and github
Git and github
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHub
 
Git cheat sheet_dark
Git cheat sheet_darkGit cheat sheet_dark
Git cheat sheet_dark
 
Git cheat sheet__white
Git cheat sheet__whiteGit cheat sheet__white
Git cheat sheet__white
 
Git cheat sheet__grey
Git cheat sheet__greyGit cheat sheet__grey
Git cheat sheet__grey
 
Learning Basic GIT Cmd
Learning Basic GIT CmdLearning Basic GIT Cmd
Learning Basic GIT Cmd
 
Git 101
Git 101Git 101
Git 101
 
Git Memento of basic commands
Git Memento of basic commandsGit Memento of basic commands
Git Memento of basic commands
 
Advanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with GitAdvanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with Git
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?
 
Git Developer Cheatsheet
Git Developer CheatsheetGit Developer Cheatsheet
Git Developer Cheatsheet
 
SVN 2 Git
SVN 2 GitSVN 2 Git
SVN 2 Git
 
Git introduction
Git introductionGit introduction
Git introduction
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Git
GitGit
Git
 
Working in Team using Git in Unity
Working in Team using Git in UnityWorking in Team using Git in Unity
Working in Team using Git in Unity
 

Recently uploaded

Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 

Recently uploaded (20)

Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Artificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic WarfareArtificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic Warfare
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 

Git and fundamentals

  • 1. GIT Fundamentals & Features Presenter: Naincy Gupta Mindfire Solutions
  • 2. About Me Certifications: M70 101 - Magento Certified Developer OCA 870 - MYSQL Contact Me: Email: naincy.gupta@mindfiresolutions.com Skype: mfsi_naincy.gupta Connect Me: - Facebook : https://www.facebook.com/naincy.gupta.35574 LinkedIn : in.linkedin.com/pub/naincy-gupta/66/440/6a3/ Google+: https://plus.google.com/u/0/+NaincyGuptaTechSharing/posts Blog: http://naincygupta@wordpress.com
  • 3. Contents  GIT  Types of VCS  Basic Fundamentals  GIT Usage  Workflows of GIT  GIT Stash  Code Quality  Why GIT make you happy?
  • 4.  Git is nothing but a SCM tool.  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.  Git is easy to learn and has a tiny footprint with lightning fast performance.
  • 5.
  • 6.
  • 7. Centralized Distributed Central, authoritative repository Everyone has its own repository All changes saved in one single location Get safety without having worry about 'breaking the build' Client-Server approach One can change in repository and those changes will be local to them unless they synchronize with someone else.
  • 9.
  • 10. Start with GIT  Install GIT client - sudo apt-get install git (linux) - brew install git (MAC)  Check if git is installed or not $ git –version  Set username and email to your git config $ git config --global user.name “Naincy” $ git config --global user.email “nansee1804@gmail.com” $ git config –list (will allow you to verify the username and email)
  • 11. GIT Fundamentals Creating a repository (if it does not exist remotely) $ git init (follow http://git-scm.com/docs/git-init for more information) Cloning a remote repository: $ git clone http[s]://host.xz[:port]/path/to/repo.git/ (Inspecting a repo: $ vim .git/config)
  • 12. Inspecting repo: $ git status [Difference b/w index file and current head commit] $ git log [Sow list of all commit with commit message] $ git log -1 [Show top 1st commit] $ git log - -pretty=oneline [Show list of all commit in single line]
  • 13. Branch Operations: $ git branch <branch_name> OR git checkout -b <branch_name> [will create new branch for you] $ git branch -D <bramch_name> [allows you to delete branch] $ git branch -m <old_branch_name> <new_branch_name> [will remane the branch name from old to new] $ git checkout <branch_name> [allows to switch to other branch] $ git log - -pretty=oneline [Show list of all commit in single line]
  • 14. Making edit and commiting $ git diff [will show delta difference code of current master HEAD and current index] $ git status [will show path of file as “Changes not staged for commit”] $ git add (-A) [will show file as “Changes to be commited”] $ git commit -m [write your commit message. Save and exit] {file changed, insertion, deletion} Check your commit by $ git log Send changes to server $ git push <branch_name> [will push your all local changes to the server] $ git pull <branch_name> [will pull all changes from server to your local]
  • 15.
  • 16. Recover your changes that you have added by mistakes $ git add <file name> [file <file name> that you have added by mistake] $ git status $ git reset HEAD <filename> $ git checkout - - <filename> Merge one branch to another $ git merge branch2 [you are in branch 1 and merging branch2] If you get conflicts, then can resolve with mergetool which provides a GUI interface to resolve conflicts. $ git mergetool
  • 18.
  • 19.
  • 20.
  • 21. GIT Stash Will allow you to save your changes without commiting them $ git stash save 'message' [save your change as a seperte stash@{*} branch with commit message] $ git stash list [will show you list of all stash with commit message] $ git show <stash@{0}> [will show you what code difference contain this this stash@{0}] $ git apply <stash@{0}> [will allow to apply change in current branch]
  • 23.
  • 24.
  • 25.
  • 26.  Fast and Compact  Freedom and Safety  Explore and Understand  Control and Assemble  Enforce Discipline: manages process by which control of items passes from one another.  Archive Version: can store subsequent versions of source control items. Also maintain lot of historical data like author, date, time, etc.  Enable Collaboration: easy sharing of files and docs  Recover from accidental deletion: can easily swith to working copy.
  • 27.
  • 28. QUESTIONS..?? Mail me your questions at nansee1804@gmail.com