SlideShare a Scribd company logo
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps Tutorial | Edureka
Devops Certification Training www.edureka.co/devops
Topics For Today’s Session
Version Control System
Version Control System Types
Version Control Tools
Git Workflow
Parallel Development & Stashing
Hands-On
1
2
3
4
5
6
Copyright © 2018, edureka and/or its affiliates. All rights reserved.
Scenario From Company
Devops Certification Training www.edureka.co/devops
Scenario Of A Company
I hope client
likes this new
feature!
Devops Certification Training www.edureka.co/devops
Scenario Of A Company
Sure! I will
remove this
feature
I do not like it!
So please
remove this
feature
Devops Certification Training www.edureka.co/devops
Scenario Of A Company
But I have already
deleted that code! I
have to re write the
whole code again
Hey! I want
that feature
back!
Devops Certification Training www.edureka.co/devops
Once saved, all
changes are
permanent and
can’t be reverted
back.
Downtime may
occur due to
faulty updates,
since there is no
backup
maintained
No collaboration
between the
team. So no
records are
maintained.
Chaos Caused Without Version Control
Copyright © 2018, edureka and/or its affiliates. All rights reserved.
Version Control
Devops Certification Training www.edureka.co/devops
Version Control System
Version control is the
management of changes
to documents, computer
programs, large web sites,
and other collections of
information.
These changes are usually
termed as “versions”.
Copyright © 2018, edureka and/or its affiliates. All rights reserved.
Version Control Types
Devops Certification Training www.edureka.co/devops
Version Control Types
Distributed Version Control SystemCentralized Version Control System
Repository
Repository Repository Repository
Working Copy Working Copy Working Copy
Workstation/
PC #1
Workstation/
PC #2
Workstation/
PC #3
Commit
Update
Commit
Update
Commit
Update
Push
Pull
Server
Repository
Working Copy Working Copy Working Copy
Workstation/
PC #1
Workstation/
PC #2
Workstation/
PC #3
Server
Commit
Update
Devops Certification Training www.edureka.co/devops
Version Control System Tools
Version control has various tools like Git, Apache Subversion, Concurrent Version Systems, Team
Foundation Server, Mercurial etc.
Devops Certification Training www.edureka.co/devops
Released under GPL’s
license. It is for free and is
open source.
Why Git wins over other tools?
Economical Non -Linear Snapshots Distributed
Speed Robust Integrity Branching
Devops Certification Training www.edureka.co/devops
Released under GPL’s
license. It is for free and is
open source.
Supports non-linear
development of software.
Why Git wins over other tools?
Economical Non -Linear Snapshots Distributed
Speed Robust Integrity Branching
Devops Certification Training www.edureka.co/devops
Released under GPL’s
license. It is for free and is
open source.
Supports non-linear
development of software.
Records changes made to
a file rather than file itself.
Why Git wins over other tools?
Economical Non -Linear Snapshots Distributed
Speed Robust Integrity Branching
Devops Certification Training www.edureka.co/devops
Released under GPL’s
license. It is for free and is
open source.
Supports non-linear
development of software.
Records changes made to
a file rather than file itself.
Every user has his own
copy of the repository
data stored locally.
Why Git wins over other tools?
Economical Non -Linear Snapshots Distributed
Speed Robust Integrity Branching
Devops Certification Training www.edureka.co/devops
Released under GPL’s
license. It is for free and is
open source.
Supports non-linear
development of software.
Records changes made to
a file rather than file itself.
Every user has his own
copy of the repository
data stored locally.
Speed offered by Git is
lightening fast compared
to other VCS’s.
Why Git wins over other tools?
Economical Non -Linear Snapshots Distributed
Speed Robust Integrity Branching
Devops Certification Training www.edureka.co/devops
Released under GPL’s
license. It is for free and is
open source.
Supports non-linear
development of software.
Records changes made to
a file rather than file itself.
Every user has his own
copy of the repository
data stored locally.
Speed offered by Git is
lightening fast compared
to other VCS’s.
Why Git wins over other tools?
Nearly every task in Git is
undo-able.
Economical Non -Linear Snapshots Distributed
Speed Robust Integrity Branching
Devops Certification Training www.edureka.co/devops
Released under GPL’s
license. It is for free and is
open source.
Supports non-linear
development of software.
Records changes made to
a file rather than file itself.
Every user has his own
copy of the repository
data stored locally.
Speed offered by Git is
lightening fast compared
to other VCS’s.
No changes can be made
without Git recording it.
Why Git wins over other tools?
Nearly every task in Git is
undo-able.
Economical Non -Linear Snapshots Distributed
Speed Robust Integrity Branching
Devops Certification Training www.edureka.co/devops
Released under GPL’s
license. It is for free and is
open source.
Supports non-linear
development of software.
Records changes made to
a file rather than file itself.
Every user has his own
copy of the repository
data stored locally.
Speed offered by Git is
lightening fast compared
to other VCS’s.
No changes can be made
without Git recording it.
Why Git wins over other tools?
Nearly every task in Git is
undo-able.
Every collaborator’s
working directory is in
itself a branch.
Economical Non -Linear Snapshots Distributed
Speed Robust Integrity Branching
Devops Certification Training www.edureka.co/devops
Released under GPL’s
license. It is for free and is
open source.
Supports non-linear
development of software.
Records changes made to
a file rather than file itself.
Every user has his own
copy of the repository
data stored locally.
Speed offered by Git is
lightening fast compared
to other VCS’s.
No changes can be made
without Git recording it.
Why Git wins over other tools?
Nearly every task in Git is
undo-able.
Every collaborator’s
working directory is in
itself a branch.
Economical Non -Linear Snapshots Distributed
Speed Robust Integrity Branching
Devops Certification Training www.edureka.co/devops
What is Git?
Git is an open source Distributed Version Control System(DVCS) which records changes made to
the files laying emphasis on speed, data integrity and distributed, non-linear workflows
Devops Certification Training www.edureka.co/devops
Workflow of Git
Devops Certification Training www.edureka.co/devops
Workflow Of Git
Copyright © 2018, edureka and/or its affiliates. All rights reserved.
Parallel Development
Devops Certification Training www.edureka.co/devops
Branching
Branching is an integral part of any Version Control(VC) System. Unlike other VC’s Git does not
create a copy of existing files for new branch. It points to snapshot of the changes you have
made in the system
Devops Certification Training www.edureka.co/devops
Merging
Merging integrates the changes made in different branches into one single branch
Devops Certification Training www.edureka.co/devops
Rebasing
Used when changes made in one branch needs to be reflected in another branch
Copyright © 2018, edureka and/or its affiliates. All rights reserved.
Stashing
Devops Certification Training www.edureka.co/devops
Stashing
Used when changes made in one branch needs to be reflected in another branch
Copyright © 2018, edureka and/or its affiliates. All rights reserved.
Hands-On
Devops Certification Training www.edureka.co/devops
Hands-On – Problem Statement
Company want a better
Source Code Management
System because the earlier
tool had the tendency to save
redundant code. Multiple
Developers working
simultaneously on same block
of code also caused problems.
Devops Certification Training www.edureka.co/devops
Hands-On – Solution
Task is to move the
company’s code base to
git and Github.
Devops Certification Training www.edureka.co/devops
Git Commands
Basic Commands
sudo apt-get install git git config --global user.name “username”
git initgit add <filename> git status git commit git diff
git rm <filename>
git rm --cached <filename>
git rm -f <filename>
git log
git tag --a <annotation> --m <message>
git add remote origin <remote link>
git tag
git show <tag-name>
git push origin master
git push origin --tags
git pull origin
git fetch origin
Devops Certification Training www.edureka.co/devops
Git Commands
git stash pop
git stash save ‘message’ git stash list git stash apply <stash id>
git stash drop <stack id> git stash clear
Stashing Commands
Branching Commands
git branch <branchname> git checkout <branchname>
git branch -D <branchname>git branch -d <branchname>
git merge <branchname>
git branch
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps Tutorial | Edureka

More Related Content

PDF
Introduction to CICD
PPT
Git basic
PDF
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
PPTX
Power of Azure Devops
PPTX
Intro to git and git hub
KEY
Git with bitbucket
PDF
Git Introduction Tutorial
PDF
Introduction to GitHub Actions
Introduction to CICD
Git basic
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
Power of Azure Devops
Intro to git and git hub
Git with bitbucket
Git Introduction Tutorial
Introduction to GitHub Actions

What's hot (20)

PDF
Introduction to Git
PDF
Git training v10
PPTX
PDF
DevOps and AWS
PDF
Git real slides
PPTX
CICD Pipeline Using Github Actions
PPTX
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
PDF
Github - Git Training Slides: Foundations
PPTX
DevOps Introduction
PPT
Version Control System
PPTX
GitOps w/argocd
PDF
Git and github 101
PPTX
Introduction to CI/CD
PDF
Git Branching for Agile Teams
PPTX
BitBucket presentation
PPTX
Devops online training ppt
PDF
What is Continuous Integration? | Continuous Integration with Jenkins | DevOp...
PDF
Gitops Hands On
PDF
ArgoCD Meetup PPT final.pdf
PPTX
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
Introduction to Git
Git training v10
DevOps and AWS
Git real slides
CICD Pipeline Using Github Actions
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Github - Git Training Slides: Foundations
DevOps Introduction
Version Control System
GitOps w/argocd
Git and github 101
Introduction to CI/CD
Git Branching for Agile Teams
BitBucket presentation
Devops online training ppt
What is Continuous Integration? | Continuous Integration with Jenkins | DevOp...
Gitops Hands On
ArgoCD Meetup PPT final.pdf
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
Ad

Similar to Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps Tutorial | Edureka (20)

PDF
Gitting better
PDF
Introduction to DevOps | Edureka
PDF
DevOps Interview Questions and Answers 2019 | DevOps Tutorial | Edureka
PDF
Know the Science behind WorkFlows using Git & GitHhub
PDF
Git Learn Version Control With Git A Stepbystep Ultimate Beginners Guide Hutten
PPTX
GIT INTRODUCTION
PPTX
Git hub_pptx
PDF
Software Engineering Tools and Practices Learn Git
PPTX
Introduction to Git
PDF
Version Control With Git Powerful Tools And Techniques For Collaborative Soft...
PDF
Introduction to Git
PDF
Git Tutorial
PPTX
Introduction to Version Control
PDF
Git Pocket Guide A Working Introduction 1st Edition Richard E. Silverman
PDF
HPLN Meet Git - Public
PDF
Pragmatic version control using Git 1st Edition Travis Swicegood
PPTX
Git Overview
PDF
Git Mastery
PDF
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
PDF
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
Gitting better
Introduction to DevOps | Edureka
DevOps Interview Questions and Answers 2019 | DevOps Tutorial | Edureka
Know the Science behind WorkFlows using Git & GitHhub
Git Learn Version Control With Git A Stepbystep Ultimate Beginners Guide Hutten
GIT INTRODUCTION
Git hub_pptx
Software Engineering Tools and Practices Learn Git
Introduction to Git
Version Control With Git Powerful Tools And Techniques For Collaborative Soft...
Introduction to Git
Git Tutorial
Introduction to Version Control
Git Pocket Guide A Working Introduction 1st Edition Richard E. Silverman
HPLN Meet Git - Public
Pragmatic version control using Git 1st Edition Travis Swicegood
Git Overview
Git Mastery
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
Ad

More from Edureka! (20)

PDF
What to learn during the 21 days Lockdown | Edureka
PDF
Top 10 Dying Programming Languages in 2020 | Edureka
PDF
Top 5 Trending Business Intelligence Tools | Edureka
PDF
Tableau Tutorial for Data Science | Edureka
PDF
Python Programming Tutorial | Edureka
PDF
Top 5 PMP Certifications | Edureka
PDF
Top Maven Interview Questions in 2020 | Edureka
PDF
Linux Mint Tutorial | Edureka
PDF
How to Deploy Java Web App in AWS| Edureka
PDF
Importance of Digital Marketing | Edureka
PDF
RPA in 2020 | Edureka
PDF
Email Notifications in Jenkins | Edureka
PDF
EA Algorithm in Machine Learning | Edureka
PDF
Cognitive AI Tutorial | Edureka
PDF
AWS Cloud Practitioner Tutorial | Edureka
PDF
Blue Prism Top Interview Questions | Edureka
PDF
Big Data on AWS Tutorial | Edureka
PDF
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
PDF
Kubernetes Installation on Ubuntu | Edureka
PDF
ITIL® Tutorial for Beginners | ITIL® Foundation Training | Edureka
What to learn during the 21 days Lockdown | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Tableau Tutorial for Data Science | Edureka
Python Programming Tutorial | Edureka
Top 5 PMP Certifications | Edureka
Top Maven Interview Questions in 2020 | Edureka
Linux Mint Tutorial | Edureka
How to Deploy Java Web App in AWS| Edureka
Importance of Digital Marketing | Edureka
RPA in 2020 | Edureka
Email Notifications in Jenkins | Edureka
EA Algorithm in Machine Learning | Edureka
Cognitive AI Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Blue Prism Top Interview Questions | Edureka
Big Data on AWS Tutorial | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Kubernetes Installation on Ubuntu | Edureka
ITIL® Tutorial for Beginners | ITIL® Foundation Training | Edureka

Recently uploaded (20)

PDF
Test Bank, Solutions for Java How to Program, An Objects-Natural Approach, 12...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Event Presentation Google Cloud Next Extended 2025
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PPTX
CroxyProxy Instagram Access id login.pptx
PDF
Chapter 2 Digital Image Fundamentals.pdf
PPTX
ChatGPT's Deck on The Enduring Legacy of Fax Machines
PDF
Dell Pro 14 Plus: Be better prepared for what’s coming
PDF
REPORT: Heating appliances market in Poland 2024
PDF
Reimagining Insurance: Connected Data for Confident Decisions.pdf
PDF
creating-agentic-ai-solutions-leveraging-aws.pdf
PDF
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
PPTX
How Much Does It Cost to Build a Train Ticket App like Trenitalia in Italy.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
PDF
Doc9.....................................
PDF
Enable Enterprise-Ready Security on IBM i Systems.pdf
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Why Endpoint Security Is Critical in a Remote Work Era?
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Test Bank, Solutions for Java How to Program, An Objects-Natural Approach, 12...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Event Presentation Google Cloud Next Extended 2025
GamePlan Trading System Review: Professional Trader's Honest Take
CroxyProxy Instagram Access id login.pptx
Chapter 2 Digital Image Fundamentals.pdf
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Dell Pro 14 Plus: Be better prepared for what’s coming
REPORT: Heating appliances market in Poland 2024
Reimagining Insurance: Connected Data for Confident Decisions.pdf
creating-agentic-ai-solutions-leveraging-aws.pdf
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
How Much Does It Cost to Build a Train Ticket App like Trenitalia in Italy.pptx
Understanding_Digital_Forensics_Presentation.pptx
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
Doc9.....................................
Enable Enterprise-Ready Security on IBM i Systems.pdf
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Why Endpoint Security Is Critical in a Remote Work Era?
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...

Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps Tutorial | Edureka

  • 2. Devops Certification Training www.edureka.co/devops Topics For Today’s Session Version Control System Version Control System Types Version Control Tools Git Workflow Parallel Development & Stashing Hands-On 1 2 3 4 5 6
  • 3. Copyright © 2018, edureka and/or its affiliates. All rights reserved. Scenario From Company
  • 4. Devops Certification Training www.edureka.co/devops Scenario Of A Company I hope client likes this new feature!
  • 5. Devops Certification Training www.edureka.co/devops Scenario Of A Company Sure! I will remove this feature I do not like it! So please remove this feature
  • 6. Devops Certification Training www.edureka.co/devops Scenario Of A Company But I have already deleted that code! I have to re write the whole code again Hey! I want that feature back!
  • 7. Devops Certification Training www.edureka.co/devops Once saved, all changes are permanent and can’t be reverted back. Downtime may occur due to faulty updates, since there is no backup maintained No collaboration between the team. So no records are maintained. Chaos Caused Without Version Control
  • 8. Copyright © 2018, edureka and/or its affiliates. All rights reserved. Version Control
  • 9. Devops Certification Training www.edureka.co/devops Version Control System Version control is the management of changes to documents, computer programs, large web sites, and other collections of information. These changes are usually termed as “versions”.
  • 10. Copyright © 2018, edureka and/or its affiliates. All rights reserved. Version Control Types
  • 11. Devops Certification Training www.edureka.co/devops Version Control Types Distributed Version Control SystemCentralized Version Control System Repository Repository Repository Repository Working Copy Working Copy Working Copy Workstation/ PC #1 Workstation/ PC #2 Workstation/ PC #3 Commit Update Commit Update Commit Update Push Pull Server Repository Working Copy Working Copy Working Copy Workstation/ PC #1 Workstation/ PC #2 Workstation/ PC #3 Server Commit Update
  • 12. Devops Certification Training www.edureka.co/devops Version Control System Tools Version control has various tools like Git, Apache Subversion, Concurrent Version Systems, Team Foundation Server, Mercurial etc.
  • 13. Devops Certification Training www.edureka.co/devops Released under GPL’s license. It is for free and is open source. Why Git wins over other tools? Economical Non -Linear Snapshots Distributed Speed Robust Integrity Branching
  • 14. Devops Certification Training www.edureka.co/devops Released under GPL’s license. It is for free and is open source. Supports non-linear development of software. Why Git wins over other tools? Economical Non -Linear Snapshots Distributed Speed Robust Integrity Branching
  • 15. Devops Certification Training www.edureka.co/devops Released under GPL’s license. It is for free and is open source. Supports non-linear development of software. Records changes made to a file rather than file itself. Why Git wins over other tools? Economical Non -Linear Snapshots Distributed Speed Robust Integrity Branching
  • 16. Devops Certification Training www.edureka.co/devops Released under GPL’s license. It is for free and is open source. Supports non-linear development of software. Records changes made to a file rather than file itself. Every user has his own copy of the repository data stored locally. Why Git wins over other tools? Economical Non -Linear Snapshots Distributed Speed Robust Integrity Branching
  • 17. Devops Certification Training www.edureka.co/devops Released under GPL’s license. It is for free and is open source. Supports non-linear development of software. Records changes made to a file rather than file itself. Every user has his own copy of the repository data stored locally. Speed offered by Git is lightening fast compared to other VCS’s. Why Git wins over other tools? Economical Non -Linear Snapshots Distributed Speed Robust Integrity Branching
  • 18. Devops Certification Training www.edureka.co/devops Released under GPL’s license. It is for free and is open source. Supports non-linear development of software. Records changes made to a file rather than file itself. Every user has his own copy of the repository data stored locally. Speed offered by Git is lightening fast compared to other VCS’s. Why Git wins over other tools? Nearly every task in Git is undo-able. Economical Non -Linear Snapshots Distributed Speed Robust Integrity Branching
  • 19. Devops Certification Training www.edureka.co/devops Released under GPL’s license. It is for free and is open source. Supports non-linear development of software. Records changes made to a file rather than file itself. Every user has his own copy of the repository data stored locally. Speed offered by Git is lightening fast compared to other VCS’s. No changes can be made without Git recording it. Why Git wins over other tools? Nearly every task in Git is undo-able. Economical Non -Linear Snapshots Distributed Speed Robust Integrity Branching
  • 20. Devops Certification Training www.edureka.co/devops Released under GPL’s license. It is for free and is open source. Supports non-linear development of software. Records changes made to a file rather than file itself. Every user has his own copy of the repository data stored locally. Speed offered by Git is lightening fast compared to other VCS’s. No changes can be made without Git recording it. Why Git wins over other tools? Nearly every task in Git is undo-able. Every collaborator’s working directory is in itself a branch. Economical Non -Linear Snapshots Distributed Speed Robust Integrity Branching
  • 21. Devops Certification Training www.edureka.co/devops Released under GPL’s license. It is for free and is open source. Supports non-linear development of software. Records changes made to a file rather than file itself. Every user has his own copy of the repository data stored locally. Speed offered by Git is lightening fast compared to other VCS’s. No changes can be made without Git recording it. Why Git wins over other tools? Nearly every task in Git is undo-able. Every collaborator’s working directory is in itself a branch. Economical Non -Linear Snapshots Distributed Speed Robust Integrity Branching
  • 22. Devops Certification Training www.edureka.co/devops What is Git? Git is an open source Distributed Version Control System(DVCS) which records changes made to the files laying emphasis on speed, data integrity and distributed, non-linear workflows
  • 23. Devops Certification Training www.edureka.co/devops Workflow of Git
  • 24. Devops Certification Training www.edureka.co/devops Workflow Of Git
  • 25. Copyright © 2018, edureka and/or its affiliates. All rights reserved. Parallel Development
  • 26. Devops Certification Training www.edureka.co/devops Branching Branching is an integral part of any Version Control(VC) System. Unlike other VC’s Git does not create a copy of existing files for new branch. It points to snapshot of the changes you have made in the system
  • 27. Devops Certification Training www.edureka.co/devops Merging Merging integrates the changes made in different branches into one single branch
  • 28. Devops Certification Training www.edureka.co/devops Rebasing Used when changes made in one branch needs to be reflected in another branch
  • 29. Copyright © 2018, edureka and/or its affiliates. All rights reserved. Stashing
  • 30. Devops Certification Training www.edureka.co/devops Stashing Used when changes made in one branch needs to be reflected in another branch
  • 31. Copyright © 2018, edureka and/or its affiliates. All rights reserved. Hands-On
  • 32. Devops Certification Training www.edureka.co/devops Hands-On – Problem Statement Company want a better Source Code Management System because the earlier tool had the tendency to save redundant code. Multiple Developers working simultaneously on same block of code also caused problems.
  • 33. Devops Certification Training www.edureka.co/devops Hands-On – Solution Task is to move the company’s code base to git and Github.
  • 34. Devops Certification Training www.edureka.co/devops Git Commands Basic Commands sudo apt-get install git git config --global user.name “username” git initgit add <filename> git status git commit git diff git rm <filename> git rm --cached <filename> git rm -f <filename> git log git tag --a <annotation> --m <message> git add remote origin <remote link> git tag git show <tag-name> git push origin master git push origin --tags git pull origin git fetch origin
  • 35. Devops Certification Training www.edureka.co/devops Git Commands git stash pop git stash save ‘message’ git stash list git stash apply <stash id> git stash drop <stack id> git stash clear Stashing Commands Branching Commands git branch <branchname> git checkout <branchname> git branch -D <branchname>git branch -d <branchname> git merge <branchname> git branch