Jontas

My digital notepad (notes etc)

Jontas

Main menu

Skip to primary content
Skip to secondary content
  • Home

Tag Archives: git rm

Git: Undo git rm on one file

Posted on 2012 June 4 by jontas

Pretend we just did a “git rm” but realized that we wish to keep one file we just removed.

git checkout HEAD path/to/file

git checkout HEAD path/to/file

This will simply checkout the file from the HEAD revision.

Another alternative is to use git reset if it is more files and no other changes are uncommitted (or stage before doing the reset)

Posted in GIT - Fast Version Control System | Tagged git, git checkout, git reset, git rm

Tags

3D printer Android apache apache2 apt-get asp.net C# charset cross browser testing debian email encoding Fermat Fermat assembly git html Internet Explorer j2me Java liftweb linux Magento magento admin mail mailserver MakerBot mobile mssql MVC3 MySQL OpenVPN org.w3c.dom php php5 PostgreSQL product SubVersion sudo ubuntu utf-8 uuid vb.net VirtualBox vpn xml

Categories

  • Android
  • Apache2
  • Arduino
  • ASP.NET
  • ASP.NET C#
  • Avant Browser
  • boinc
  • BSD
  • Build server
  • C#
  • Cisco
  • CSS
  • Currently Making / Made / Buildlog
  • Cygwin
  • DataBase
  • debian
  • Development
  • DOMElement
  • DOSBox
  • dotNet
  • Eclipse
  • exim4
  • Fermat
  • Firefox
  • Flock
  • gallery2
  • GetBoo
  • GIT – Fast Version Control System
  • Google Chrome
  • HTML
  • IDE
  • IIS
  • Internet Explorer
  • Java
  • JavaScript
  • JQuery
  • Laptops
  • LDraw
  • Lift
  • linux
  • Lynx
  • Magento
  • Makerbot
  • Making
  • md
  • MediaWiki
  • Mindset
  • MLCad
  • Mobile Phone
  • Modern Warfare 2
  • MVC3
  • MySQL
  • Netscape
  • OpenSSH
  • OpenVPN
  • OpenX
  • Opera
  • PHP
  • PHP4
  • PHP5
  • PHPMailer
  • PHPUnit
  • piwik
  • PostgreSQL
  • Programming
  • Python
  • RAID
  • remote desktop
  • ReplicatorG
  • rsync
  • Scala
  • SeaMonkey
  • sendmail
  • shorewall
  • SimpleXML
  • SQLServer
  • SubVersion
  • sudo
  • Survival
  • synergy
  • Systems (programs etc)
  • ubuntu
  • unix
  • vb.Net
  • VirtualBox
  • Visions / Hopes for the future
  • Visual Studio 2012
  • Web development
  • windows
  • Windows 2000
  • Windows 2003
  • Windows 7
  • Windows Vista
  • Windows XP
  • WordPress

AIS

  • AIS live Utlängen
  • Trelle.net AIS Skåne & Blekinge

Blogroll

  • Communications wiki
  • Computer (and computer related) Hardware wiki
  • Misc usefull items
  • Self Sufficient Folks – wiki

comics

  • Piled Higher and Deeper
  • User Friendly
Proudly powered by WordPress