SlideShare a Scribd company logo
1 of 29
GIT Introduction
Version Control System
Dian Sigit Prastowo & Agastyo Satriaji Idam
Problem
Version Control System
“A version control system (sometimes called revision
control) is a tool that lets you track the history and
attribution of your project files over time (stored in a
repository), and which helps the developers in the team to
work together. Modern version control systems help them
work simultaneously, in a non-blocking way, by giving
each developer his or her own sandbox, preventing their
work in progress from conflicting, and all the while
providing a mechanism to merge changes and
synchronize work.”
“Mastering Git.”
Version Control System
What is GIT?
Git is Distributed Version Control System
“Distributed means that there is no main server and all
of the full history of the project is available once you
cloned the project”
A Brief History
• In 2002, the Linux kernel project bega using a DVCS
calld BitKeeper.
• In 2005, the commercial company that developed
BitKeeper broke down, and the tool’s free-of-charge
status was revoked.
• This prompted the Linux development community
(and in particular Linux Trovalds, the creator of Linux)
to develop their own tool - GIT
First of all, definitions
• Working tree
A directory in your filesystem that is
associated with a repository, containing files &
sub-directories
• Repository
A collection of commits & branches, saved
in the .git directory
• Commit
A Snapshot of your working tree at a certain
point in time, identified by a revision number.
• HEAD
The name for the commit thats currently
checked out in.
GIT
• You can imagine git as something that
sits on top of your file system and
manipulates files.
• This “something” is a tree structure
where each commit creates a new
node in that tree.
• Nearly all git commands actually serve
to navigate on this tree and to
manipulate it accordingly.
GIT Commands
Version Control System
Dian Sigit Prastowo & Agastyo Satriaji Idam
Commands
• git config
• git init
• git add
• git rm
• git commit
• git log
• git diff
• git status
• git reset
• git branch
• git checkout
• git merge
• git remote
• git clone
• git push
• git pull
Install Git on Windows
• Download the latest Git for Windows installer git
• Started the installer, you should see the Git Setup wizard screen.
Follow the Next and Finish prompts to complete the installation.
• Open a Command Prompt (or Git Bash if during installation you
elected not to use Git from the Windows Command Prompt).
• Run the following commands to configure your Git username and
email using the following commands:
$ git config --global user.name “Dian Sigit”
$ git config --global user.email
"diansigit.p@gmail.com”
Configuration
Local Repository
git init
git-init - Create an empty Git repository or reinitialize an existing one
Local Repository
git add
git-add - Add file contents to the index
Local Repository
git rm
git-rm - Remove files from the working tree and from the index
Local Repository
git commit
git-commit - Record changes to the repository
Local Repository
git commit
git-commit - Record changes to the repository
Local Repository
git log
git-log - Show commit logs
Local Repository
git diff
git-diff - Show changes between commits, commit and working tree, etc
Local Repository
git status
git-status - Show the working tree status
Local Repository
git reset
git-reset - Reset current HEAD to the specified state
Local Repository
git branch
git-branch - List, create, or delete branches
Local Repository
git checkout
git-checkout - Switch branches or restore working tree files
Local Repository
git merge
git-merge - Join two or more development histories together
Installing SSH keys on
Windows
• To access your Git repositories you will need to create and
install SSH keys
• Generating a key pair, ssh-keygen -t rsa
• Copy the public key, and paste on gitlab SSH Key Settings,
cat ~/.ssh/id_rsa.pub | clip
• Checking your connection, ssh git@gitlab.uii.ac.id
Collaboration Repository
git remote
git-remote - Manage set of tracked repositories
Collaboration Repository
git clone
git-clone - Clone a repository into a new directory
Collaboration Repository
git push
git-push - Update remote refs along with associated objects
Collaboration Repository
git pull
git-pull - Fetch from and integrate with another repository or a local branch

More Related Content

What's hot

Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionIntroduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionAnwarul Islam
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsLee Hanxue
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notesglen_a_smith
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitLukas Fittl
 
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 overviewRueful Robin
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An IntroductionBehzad Altaf
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdfTilton2
 

What's hot (20)

Introduction To Git
Introduction To GitIntroduction To Git
Introduction To Git
 
Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionIntroduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training Session
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Basic Git Intro
Basic Git IntroBasic Git Intro
Basic Git Intro
 
Git training v10
Git training v10Git training v10
Git training v10
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
git and github
git and githubgit and github
git and github
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
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
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdf
 
Git and github
Git and githubGit and github
Git and github
 

Viewers also liked

Git 101 Presentation
Git 101 PresentationGit 101 Presentation
Git 101 PresentationScott Chacon
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git RightSven Peters
 
寫給大家的 Git 教學
寫給大家的 Git 教學寫給大家的 Git 教學
寫給大家的 Git 教學littlebtc
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners HubSpot
 
[NDC16] Effective Git
[NDC16] Effective Git[NDC16] Effective Git
[NDC16] Effective GitChanwoong Kim
 
いつやるの?Git入門 v1.1.0
いつやるの?Git入門 v1.1.0いつやるの?Git入門 v1.1.0
いつやるの?Git入門 v1.1.0Masakazu Matsushita
 
Introduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guideIntroduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guideRohit Arora
 
Quick Introduction to git
Quick Introduction to gitQuick Introduction to git
Quick Introduction to gitJoel Krebs
 
Basic principles of Git
Basic principles of GitBasic principles of Git
Basic principles of Gitphuongvohuy
 
Git-ing out of your git messes
Git-ing out of  your git messesGit-ing out of  your git messes
Git-ing out of your git messesKatie Sylor-Miller
 
GIT Workflows
GIT Workflows GIT Workflows
GIT Workflows BraveBits
 
introduction of GIT System
introduction of GIT Systemintroduction of GIT System
introduction of GIT SystemDr Laxman Khanal
 

Viewers also liked (20)

Git 101 Presentation
Git 101 PresentationGit 101 Presentation
Git 101 Presentation
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git Right
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Getting Git
Getting GitGetting Git
Getting Git
 
寫給大家的 Git 教學
寫給大家的 Git 教學寫給大家的 Git 教學
寫給大家的 Git 教學
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
 
[NDC16] Effective Git
[NDC16] Effective Git[NDC16] Effective Git
[NDC16] Effective Git
 
Git Tutorial 教學
Git Tutorial 教學Git Tutorial 教學
Git Tutorial 教學
 
いつやるの?Git入門 v1.1.0
いつやるの?Git入門 v1.1.0いつやるの?Git入門 v1.1.0
いつやるの?Git入門 v1.1.0
 
Git learning
Git learningGit learning
Git learning
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Git Branching Model
Git Branching ModelGit Branching Model
Git Branching Model
 
Introduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guideIntroduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guide
 
Quick Introduction to git
Quick Introduction to gitQuick Introduction to git
Quick Introduction to git
 
git command
git commandgit command
git command
 
Git studynotes
Git studynotesGit studynotes
Git studynotes
 
Basic principles of Git
Basic principles of GitBasic principles of Git
Basic principles of Git
 
Git-ing out of your git messes
Git-ing out of  your git messesGit-ing out of  your git messes
Git-ing out of your git messes
 
GIT Workflows
GIT Workflows GIT Workflows
GIT Workflows
 
introduction of GIT System
introduction of GIT Systemintroduction of GIT System
introduction of GIT System
 

Similar to Introduction git

Similar to Introduction git (20)

Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
Git 101
Git 101Git 101
Git 101
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
 
Version control git day02
Version control   git day02Version control   git day02
Version control git day02
 
Git introduction
Git introductionGit introduction
Git introduction
 
Git hub
Git hubGit hub
Git hub
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
Git Workshop : Getting Started
Git Workshop : Getting StartedGit Workshop : Getting Started
Git Workshop : Getting Started
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHub
 
Git
GitGit
Git
 
Git training (basic)
Git training (basic)Git training (basic)
Git training (basic)
 
1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptx
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Git in a nutshell
Git in a nutshellGit in a nutshell
Git in a nutshell
 
Git.pptx
Git.pptxGit.pptx
Git.pptx
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
 
Git and github
Git and githubGit and github
Git and github
 
Git Training
Git TrainingGit Training
Git Training
 

Recently uploaded

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Introduction git

  • 1. GIT Introduction Version Control System Dian Sigit Prastowo & Agastyo Satriaji Idam
  • 3. Version Control System “A version control system (sometimes called revision control) is a tool that lets you track the history and attribution of your project files over time (stored in a repository), and which helps the developers in the team to work together. Modern version control systems help them work simultaneously, in a non-blocking way, by giving each developer his or her own sandbox, preventing their work in progress from conflicting, and all the while providing a mechanism to merge changes and synchronize work.” “Mastering Git.”
  • 5. What is GIT? Git is Distributed Version Control System “Distributed means that there is no main server and all of the full history of the project is available once you cloned the project”
  • 6. A Brief History • In 2002, the Linux kernel project bega using a DVCS calld BitKeeper. • In 2005, the commercial company that developed BitKeeper broke down, and the tool’s free-of-charge status was revoked. • This prompted the Linux development community (and in particular Linux Trovalds, the creator of Linux) to develop their own tool - GIT
  • 7. First of all, definitions • Working tree A directory in your filesystem that is associated with a repository, containing files & sub-directories • Repository A collection of commits & branches, saved in the .git directory • Commit A Snapshot of your working tree at a certain point in time, identified by a revision number. • HEAD The name for the commit thats currently checked out in.
  • 8. GIT • You can imagine git as something that sits on top of your file system and manipulates files. • This “something” is a tree structure where each commit creates a new node in that tree. • Nearly all git commands actually serve to navigate on this tree and to manipulate it accordingly.
  • 9. GIT Commands Version Control System Dian Sigit Prastowo & Agastyo Satriaji Idam
  • 10. Commands • git config • git init • git add • git rm • git commit • git log • git diff • git status • git reset • git branch • git checkout • git merge • git remote • git clone • git push • git pull
  • 11. Install Git on Windows • Download the latest Git for Windows installer git • Started the installer, you should see the Git Setup wizard screen. Follow the Next and Finish prompts to complete the installation. • Open a Command Prompt (or Git Bash if during installation you elected not to use Git from the Windows Command Prompt). • Run the following commands to configure your Git username and email using the following commands: $ git config --global user.name “Dian Sigit” $ git config --global user.email "diansigit.p@gmail.com”
  • 13. Local Repository git init git-init - Create an empty Git repository or reinitialize an existing one
  • 14. Local Repository git add git-add - Add file contents to the index
  • 15. Local Repository git rm git-rm - Remove files from the working tree and from the index
  • 16. Local Repository git commit git-commit - Record changes to the repository
  • 17. Local Repository git commit git-commit - Record changes to the repository
  • 18. Local Repository git log git-log - Show commit logs
  • 19. Local Repository git diff git-diff - Show changes between commits, commit and working tree, etc
  • 20. Local Repository git status git-status - Show the working tree status
  • 21. Local Repository git reset git-reset - Reset current HEAD to the specified state
  • 22. Local Repository git branch git-branch - List, create, or delete branches
  • 23. Local Repository git checkout git-checkout - Switch branches or restore working tree files
  • 24. Local Repository git merge git-merge - Join two or more development histories together
  • 25. Installing SSH keys on Windows • To access your Git repositories you will need to create and install SSH keys • Generating a key pair, ssh-keygen -t rsa • Copy the public key, and paste on gitlab SSH Key Settings, cat ~/.ssh/id_rsa.pub | clip • Checking your connection, ssh git@gitlab.uii.ac.id
  • 26. Collaboration Repository git remote git-remote - Manage set of tracked repositories
  • 27. Collaboration Repository git clone git-clone - Clone a repository into a new directory
  • 28. Collaboration Repository git push git-push - Update remote refs along with associated objects
  • 29. Collaboration Repository git pull git-pull - Fetch from and integrate with another repository or a local branch