SlideShare a Scribd company logo
1 of 22
Version
Control
Why?
Why?
Getting Started
A version control system is a special application that stores and manages
every revision of your files and code. Many developers and organizations use
version control to collaborate on source code, manage releases, and roll back
to previous versions when bugs are discovered.
5
VCS
6
Benefits
7
•Backup and Restore
•Synchronization
•Short-term undo
•Long-term undo
•Track Changes
•Track Ownership
•Sandboxing
•Branching and
•merging
Installation & Setup
8
1. Git is a versioning system developed by Linus Torvalds, that is used by
millions of users around the globe. Companies like GitHub offer code hosting
services based on Git.
2. Run your own Git server
3. Git Client
4. https://git-scm.com/downloads
9
Basic Setup
Repository (repo): The database storing the files.
Server: The computer storing the repo.
Client: The computer connecting to the repo.
Working Set/Working Copy: Your local directory of files,
where you make changes.
Trunk/Main: The primary location for code in the repo.
Think of code as a family tree — the trunk is the main line.
Features
10
Add: Put a file into the repo for the first time, i.e. begin tracking it with
Version Control.
Revision: What version a file is on (v1, v2, v3, etc.).
Head: The latest revision in the repo.
Check out: Download a file from the repo.
Check in: Upload a file to the repository (if it has changed). The file
gets a new revision number, and people can “check out” the latest one.
Checkin Message: A short message describing what was
changed.
Changelog/History: A list of changes made to a file since it was
created.
11
Update/Sync: Synchronize your files with the latest from
the repository. This lets you grab the latest revisions of all
files.
Revert Throw away your local changes and reload
the latest version from the repository
Branch: Create a separate copy of a file/folder for
private use (bug fixing, testing, etc). Branch is both
a verb (“branch the code”) and a noun (“Which
branch is it in?”)
12
Diff/Change/Delta: Finding the differences between
two files. Useful for seeing what changed between revisions.
Merge (or patch): Apply the changes from one file to
another, to bring it up-to-date. For example, you can merge
features from one branch into another.
Conflict: When pending changes to a file contradict each
other (both changes cannot be applied).
13
Resolve: Fixing the changes that contradict each other
and checking in the correct version.
Locking: Taking control of a file so nobody else can edit
it until you unlock it. Some version control systems use
this to avoid conflicts.
Breaking the lock: Forcibly unlocking a file so you can edit
it. It may be needed if someone locks a file and goes on
vacation (or “calls in sick” the day Halo 3 comes out).
Check out for edit: Checking out an “editable” version of a
file. Some VCSes have editable files by default, others require
an explicit command.
14
Git Commands
15
1. Initializing a Git Repository
2.
git init
Repository Status
git status
3.Adding files to Repository
git add file [file] [file..]
Git Commands
16
4.Committing Staged Files
5.
git commit -m ‘Initial Commit’
Pushing to repository
git push
6.Check status
git status
Uploading the content to github
17
git remote add origin remote url.git
git push origin master
Cloning the repository
git clone remote url.git
18
Checking the difference on conflict
19
git diff
git revert HEAD
Reverting the version
Git pull
git checkout -b [name_of_your_new_branch]
git push origin [name_of_your_new_branch]
Create a branch
git branch -a
View all branches
Add remote to your branch
20
git remote add [name_of_your_remote] [name_of_your_new_branch]
git push --set-upstream origin branch_name
Push changes from your commit into your branch :
Git add .
git commit –m “message”
git push --set-upstream origin branch_name
Then Add commit and push
git branch -a
View all branches
Update your branch when the original branch from official
repository has been updated
21
git fetch [name_of_your_remote]
Then you need to apply to merge changes if your branch is
Git checkout master
git merge [name_of_your_branch]
Thanks

More Related Content

What's hot (20)

GIT | Distributed Version Control System
GIT | Distributed Version Control SystemGIT | Distributed Version Control System
GIT | Distributed Version Control System
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Git basics to advance with diagrams
Git basics to advance with diagramsGit basics to advance with diagrams
Git basics to advance with diagrams
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
Learning git
Learning gitLearning git
Learning git
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & Git
 
Git
GitGit
Git
 
git and github
git and githubgit and github
git and github
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
Git with bitbucket
Git with bitbucketGit with bitbucket
Git with bitbucket
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
 
Git and GitFlow branching model
Git and GitFlow branching modelGit and GitFlow branching model
Git and GitFlow branching model
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 

Similar to Understanding GIT and Version Control

Similar to Understanding GIT and Version Control (20)

git Versioning
git Versioninggit Versioning
git Versioning
 
Git&GitHub.pptx
Git&GitHub.pptxGit&GitHub.pptx
Git&GitHub.pptx
 
Version control with git
Version control with gitVersion control with git
Version control with git
 
Git introduction
Git introductionGit introduction
Git introduction
 
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 101
Git 101Git 101
Git 101
 
Git training (basic)
Git training (basic)Git training (basic)
Git training (basic)
 
setting up a repository using GIT
setting up a repository using GITsetting up a repository using GIT
setting up a repository using GIT
 
CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GIT
 
Git
GitGit
Git
 
Version control with GIT
Version control with GITVersion control with GIT
Version control with GIT
 
git2.ppt
git2.pptgit2.ppt
git2.ppt
 
Introduction to git & GitHub
Introduction to git & GitHubIntroduction to git & GitHub
Introduction to git & GitHub
 
Git
GitGit
Git
 
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_Overview.
GIT_Overview.GIT_Overview.
GIT_Overview.
 
Git
GitGit
Git
 
Git basics for beginners
Git basics for beginnersGit basics for beginners
Git basics for beginners
 
git.ppt
git.pptgit.ppt
git.ppt
 
Git_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_GuidewireGit_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_Guidewire
 

More from Sourabh Sahu

Python Seaborn Data Visualization
Python Seaborn Data Visualization Python Seaborn Data Visualization
Python Seaborn Data Visualization Sourabh Sahu
 
Mongo db Quick Guide
Mongo db Quick GuideMongo db Quick Guide
Mongo db Quick GuideSourabh Sahu
 
Android styles and themes
Android styles and themesAndroid styles and themes
Android styles and themesSourabh Sahu
 
SeekBar in Android
SeekBar in AndroidSeekBar in Android
SeekBar in AndroidSourabh Sahu
 
Android ListView and Custom ListView
Android ListView and Custom ListView Android ListView and Custom ListView
Android ListView and Custom ListView Sourabh Sahu
 
Android project architecture
Android project architectureAndroid project architecture
Android project architectureSourabh Sahu
 
Shared preferences
Shared preferencesShared preferences
Shared preferencesSourabh Sahu
 
Content Providers in Android
Content Providers in AndroidContent Providers in Android
Content Providers in AndroidSourabh Sahu
 
Calendar, Clocks, DatePicker and TimePicker
Calendar, Clocks, DatePicker and TimePickerCalendar, Clocks, DatePicker and TimePicker
Calendar, Clocks, DatePicker and TimePickerSourabh Sahu
 
Progress Dialog, AlertDialog, CustomDialog
Progress Dialog, AlertDialog, CustomDialogProgress Dialog, AlertDialog, CustomDialog
Progress Dialog, AlertDialog, CustomDialogSourabh Sahu
 
AutocompleteTextView And MultiAutoCompleteTextView
AutocompleteTextView And MultiAutoCompleteTextViewAutocompleteTextView And MultiAutoCompleteTextView
AutocompleteTextView And MultiAutoCompleteTextViewSourabh Sahu
 
Parceable serializable
Parceable serializableParceable serializable
Parceable serializableSourabh Sahu
 
Android Architecture
Android ArchitectureAndroid Architecture
Android ArchitectureSourabh Sahu
 
Android Installation Testing
Android Installation TestingAndroid Installation Testing
Android Installation TestingSourabh Sahu
 
Android Installation
Android Installation Android Installation
Android Installation Sourabh Sahu
 

More from Sourabh Sahu (20)

Python Seaborn Data Visualization
Python Seaborn Data Visualization Python Seaborn Data Visualization
Python Seaborn Data Visualization
 
Mongo db Quick Guide
Mongo db Quick GuideMongo db Quick Guide
Mongo db Quick Guide
 
Python Course
Python CoursePython Course
Python Course
 
Android styles and themes
Android styles and themesAndroid styles and themes
Android styles and themes
 
SeekBar in Android
SeekBar in AndroidSeekBar in Android
SeekBar in Android
 
Android layouts
Android layoutsAndroid layouts
Android layouts
 
Android ListView and Custom ListView
Android ListView and Custom ListView Android ListView and Custom ListView
Android ListView and Custom ListView
 
Activities
ActivitiesActivities
Activities
 
Android project architecture
Android project architectureAndroid project architecture
Android project architecture
 
Shared preferences
Shared preferencesShared preferences
Shared preferences
 
Content Providers in Android
Content Providers in AndroidContent Providers in Android
Content Providers in Android
 
SQLITE Android
SQLITE AndroidSQLITE Android
SQLITE Android
 
Calendar, Clocks, DatePicker and TimePicker
Calendar, Clocks, DatePicker and TimePickerCalendar, Clocks, DatePicker and TimePicker
Calendar, Clocks, DatePicker and TimePicker
 
Progress Dialog, AlertDialog, CustomDialog
Progress Dialog, AlertDialog, CustomDialogProgress Dialog, AlertDialog, CustomDialog
Progress Dialog, AlertDialog, CustomDialog
 
AutocompleteTextView And MultiAutoCompleteTextView
AutocompleteTextView And MultiAutoCompleteTextViewAutocompleteTextView And MultiAutoCompleteTextView
AutocompleteTextView And MultiAutoCompleteTextView
 
Web view
Web viewWeb view
Web view
 
Parceable serializable
Parceable serializableParceable serializable
Parceable serializable
 
Android Architecture
Android ArchitectureAndroid Architecture
Android Architecture
 
Android Installation Testing
Android Installation TestingAndroid Installation Testing
Android Installation Testing
 
Android Installation
Android Installation Android Installation
Android Installation
 

Recently uploaded

Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 

Recently uploaded (20)

Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 

Understanding GIT and Version Control

  • 4.
  • 5. Getting Started A version control system is a special application that stores and manages every revision of your files and code. Many developers and organizations use version control to collaborate on source code, manage releases, and roll back to previous versions when bugs are discovered. 5
  • 7. Benefits 7 •Backup and Restore •Synchronization •Short-term undo •Long-term undo •Track Changes •Track Ownership •Sandboxing •Branching and •merging
  • 8. Installation & Setup 8 1. Git is a versioning system developed by Linus Torvalds, that is used by millions of users around the globe. Companies like GitHub offer code hosting services based on Git. 2. Run your own Git server 3. Git Client 4. https://git-scm.com/downloads
  • 9. 9 Basic Setup Repository (repo): The database storing the files. Server: The computer storing the repo. Client: The computer connecting to the repo. Working Set/Working Copy: Your local directory of files, where you make changes. Trunk/Main: The primary location for code in the repo. Think of code as a family tree — the trunk is the main line.
  • 10. Features 10 Add: Put a file into the repo for the first time, i.e. begin tracking it with Version Control. Revision: What version a file is on (v1, v2, v3, etc.). Head: The latest revision in the repo. Check out: Download a file from the repo. Check in: Upload a file to the repository (if it has changed). The file gets a new revision number, and people can “check out” the latest one. Checkin Message: A short message describing what was changed. Changelog/History: A list of changes made to a file since it was created.
  • 11. 11 Update/Sync: Synchronize your files with the latest from the repository. This lets you grab the latest revisions of all files. Revert Throw away your local changes and reload the latest version from the repository Branch: Create a separate copy of a file/folder for private use (bug fixing, testing, etc). Branch is both a verb (“branch the code”) and a noun (“Which branch is it in?”)
  • 12. 12 Diff/Change/Delta: Finding the differences between two files. Useful for seeing what changed between revisions. Merge (or patch): Apply the changes from one file to another, to bring it up-to-date. For example, you can merge features from one branch into another. Conflict: When pending changes to a file contradict each other (both changes cannot be applied).
  • 13. 13 Resolve: Fixing the changes that contradict each other and checking in the correct version. Locking: Taking control of a file so nobody else can edit it until you unlock it. Some version control systems use this to avoid conflicts. Breaking the lock: Forcibly unlocking a file so you can edit it. It may be needed if someone locks a file and goes on vacation (or “calls in sick” the day Halo 3 comes out). Check out for edit: Checking out an “editable” version of a file. Some VCSes have editable files by default, others require an explicit command.
  • 14. 14
  • 15. Git Commands 15 1. Initializing a Git Repository 2. git init Repository Status git status 3.Adding files to Repository git add file [file] [file..]
  • 16. Git Commands 16 4.Committing Staged Files 5. git commit -m ‘Initial Commit’ Pushing to repository git push 6.Check status git status
  • 17. Uploading the content to github 17 git remote add origin remote url.git git push origin master Cloning the repository git clone remote url.git
  • 18. 18
  • 19. Checking the difference on conflict 19 git diff git revert HEAD Reverting the version Git pull git checkout -b [name_of_your_new_branch] git push origin [name_of_your_new_branch] Create a branch git branch -a View all branches
  • 20. Add remote to your branch 20 git remote add [name_of_your_remote] [name_of_your_new_branch] git push --set-upstream origin branch_name Push changes from your commit into your branch : Git add . git commit –m “message” git push --set-upstream origin branch_name Then Add commit and push git branch -a View all branches
  • 21. Update your branch when the original branch from official repository has been updated 21 git fetch [name_of_your_remote] Then you need to apply to merge changes if your branch is Git checkout master git merge [name_of_your_branch]