Open in app
Praj Basnet
1 Follower
About

Sign in

1 Follower
About
Open in app

Batch undo git modifications

Praj Basnet

Praj Basnet

·Nov 26, 2020

The following command can be used to find and checkout (undo) all files with modifications:

git checkout $(git ls-files -m)

This is effectively an “undo” of all modifications in the given branch (but it doesn’t impact added or deleted files).

  • Git
  • Software Development
  • Code
  • Version Control

More from Praj Basnet

More From Medium

Handling flaky GUI tests correctly in a Jenkins-Junit-mvn-Selenium setup.

Pramod Yadav

Are Math and CS knowledge really necessary for developers, engineers, and programmers?

Skrew Everything in From The Scratch

Base64 Encoding Algorithm

Anagha Kumbhojkar in The Startup

Run Docker In Docker

Vinodhakumara

The Future of Web Software Is HTML.

Piotr Dariusz Makowski

5 Command-Line Tricks You’ll Fall-in-Love With

Sarthak in Dev Genius

Basic Authentication in Swagger (Open API) .Net 5

Jaykrishnareddy in Nerd For Tech

From Idea to MVP to Hacker News in 44 Hours

Darren Devitt

About

Help

Legal

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store