Get unlimited access
Open in app
Home
Notifications
Lists
Stories

Write
Praj Basnet
Praj Basnet

Nov 26, 2020

·
1 min read

Batch undo git modifications

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).

--

--

More from Praj Basnet

Love podcasts or audiobooks? Learn on the go with our new app.

Try Knowable

Recommended from Medium

Florian Bouron

Florian Bouron

in

AWS in Plain English

Introduction to AWS Identity and Access Management (IAM)

Keys representing AWS IAM
Carolyn Chloe

Carolyn Chloe

Accident Lawyer Sandy Utah

accident lawyer sandy utah
Isaac Ndung'u

Isaac Ndung'u

Change and Configuration Management — The DevOps Way

Nithesh

Nithesh

Does the flutter apk size really matter?

Giulia Di Pietro

Giulia Di Pietro

in

Dynatrace Engineering

From test automation to security: my career at Dynatrace

Sougata Singha

Sougata Singha

Loading S3 data into redshift table

Ekon Justus

Ekon Justus

What makes Thinkium special (Part 1)

Kiran Chauhan

Kiran Chauhan

GTK4 Tutorial Pt. 2

AboutHelpTermsPrivacy


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
Praj Basnet

Praj Basnet

More from Medium

Parthpritam

Parthpritam

TYPESCRIPTS

Raman Bhadauria

Raman Bhadauria

Predefined Functional Interfaces

cengkuru michael

cengkuru michael

Design patterns and how they can save your software development project.

Omkar Adhali

Omkar Adhali

Specification Design Pattern

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable