SlideShare a Scribd company logo
Git Terminology & Handy Features
Geeta Vinnakota
7/7/2013
Reset
● Scenario: Made some commits to the staging
area (index), did not push to remote yet, but
you do not want them anymore
● Git reset –hard origin/branch_name
HEAD
● Head is nothing but the current branch
● Cat .git/head
Rebase
● Scenario: You branched off master and have
been working of that feature branch for a
while. During that time, there have been
several new updates to master. Now to
retrieve the history, instead of merging them
into your branch, you just rebase your feature
branch
● Git rebase origin/branch_name
● Git push feature_branch -f
Index
● Datastructure that represents a staging area
between work directory and the repository
● Git status – gives what is on the index
Interactive Rebase
● Scenario: You Identify a typo, a possibility of
minor refactoring etc. Instead of making a
whole new commit, you can do an interactive
rebase
● Steps:
● Make the new commit
● Git rebase -i HEAD~#ofcommits
● Present you with various options( select one)
● Do a force push & be careful that you do not
push unintended things.
Interactive Rebase
● Scenario: You Identify a typo, a possibility of
minor refactoring etc. Instead of making a
whole new commit, you can do an interactive
rebase
● Steps:
● Make the new commit
● Git rebase -i HEAD~#ofcommits
● Present you with various options( select one)
● Do a force push & be careful that you do not
push unintended things.

More Related Content

PPTX
Git rewriting git history
PDF
Change history with Git
PDF
Git rebase
PDF
Running kubernetes
PDF
How to become a Git power user
PPTX
Git basic commands
PPTX
Git basics 2
ODP
Git rewriting git history
Change history with Git
Git rebase
Running kubernetes
How to become a Git power user
Git basic commands
Git basics 2

Similar to Git (20)

PDF
Honestly Git Playground 20190221
PDF
Git tutorial
ODP
Introduction of Git
PPTX
Git tips
PPTX
Git and git workflow best practice
PDF
Git-flow workflow and pull-requests
PPTX
Mastering GIT
PDF
Git 101: Force-sensitive to Jedi padawan
ODP
Git tech talk
PDF
Introducing Git and git flow
PDF
Git slides
PDF
Git: basic to advanced
PPTX
Lets git to it
ODP
The Fundamentals of Git
PDF
Git of every day
PPTX
Git-ing out of your git messes
PDF
GIT_training_SoftServeBulgaria2016
PDF
Advanced git
PDF
PDF
Getting some Git
Honestly Git Playground 20190221
Git tutorial
Introduction of Git
Git tips
Git and git workflow best practice
Git-flow workflow and pull-requests
Mastering GIT
Git 101: Force-sensitive to Jedi padawan
Git tech talk
Introducing Git and git flow
Git slides
Git: basic to advanced
Lets git to it
The Fundamentals of Git
Git of every day
Git-ing out of your git messes
GIT_training_SoftServeBulgaria2016
Advanced git
Getting some Git
Ad

Recently uploaded (20)

PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
A novel scalable deep ensemble learning framework for big data classification...
PPTX
A Presentation on Touch Screen Technology
PDF
Encapsulation theory and applications.pdf
PDF
August Patch Tuesday
PDF
Mushroom cultivation and it's methods.pdf
Hindi spoken digit analysis for native and non-native speakers
cloud_computing_Infrastucture_as_cloud_p
Building Integrated photovoltaic BIPV_UPV.pdf
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
TLE Review Electricity (Electricity).pptx
Web App vs Mobile App What Should You Build First.pdf
Assigned Numbers - 2025 - Bluetooth® Document
Digital-Transformation-Roadmap-for-Companies.pptx
Zenith AI: Advanced Artificial Intelligence
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Group 1 Presentation -Planning and Decision Making .pptx
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
A novel scalable deep ensemble learning framework for big data classification...
A Presentation on Touch Screen Technology
Encapsulation theory and applications.pdf
August Patch Tuesday
Mushroom cultivation and it's methods.pdf
Ad

Git

  • 1. Git Terminology & Handy Features Geeta Vinnakota 7/7/2013
  • 2. Reset ● Scenario: Made some commits to the staging area (index), did not push to remote yet, but you do not want them anymore ● Git reset –hard origin/branch_name
  • 3. HEAD ● Head is nothing but the current branch ● Cat .git/head
  • 4. Rebase ● Scenario: You branched off master and have been working of that feature branch for a while. During that time, there have been several new updates to master. Now to retrieve the history, instead of merging them into your branch, you just rebase your feature branch ● Git rebase origin/branch_name ● Git push feature_branch -f
  • 5. Index ● Datastructure that represents a staging area between work directory and the repository ● Git status – gives what is on the index
  • 6. Interactive Rebase ● Scenario: You Identify a typo, a possibility of minor refactoring etc. Instead of making a whole new commit, you can do an interactive rebase ● Steps: ● Make the new commit ● Git rebase -i HEAD~#ofcommits ● Present you with various options( select one) ● Do a force push & be careful that you do not push unintended things.
  • 7. Interactive Rebase ● Scenario: You Identify a typo, a possibility of minor refactoring etc. Instead of making a whole new commit, you can do an interactive rebase ● Steps: ● Make the new commit ● Git rebase -i HEAD~#ofcommits ● Present you with various options( select one) ● Do a force push & be careful that you do not push unintended things.