@lisyarus@mastodon.gamedev.place
@lisyarus@mastodon.gamedev.place avatar

lisyarus

@lisyarus@mastodon.gamedev.place

He/him

I live in a totalitarian state, teach computer graphics, and make videogames

Check out my cozy traffic simulator: https://store.steampowered.com/app/2403100/Costa_Verde_Transport_Department/

This profile is from a federated server and may be incomplete. Browse more on the original instance.

efi, to random
@efi@chitter.xyz avatar

how do I remove the changes to a file a single commit made in the middle of the history?

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@efi If there were no changes to that file after that, you can do

git checkout <last-good-revision> -- <path-to-file>

Otherwise the only thing I can think of is

git revert <bad-commit> --no-commit

and then discard all the changes that don't touch your specific file

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@efi Hmmm wdym "which side"?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • โ€ข
  • provamag3
  • GTA5RPClips
  • magazineikmin
  • tacticalgear
  • khanakhh
  • InstantRegret
  • Youngstown
  • mdbf
  • slotface
  • thenastyranch
  • everett
  • osvaldo12
  • kavyap
  • rosin
  • megavids
  • DreamBathrooms
  • Durango
  • normalnudes
  • ngwrru68w68
  • vwfavf
  • ethstaker
  • modclub
  • cubers
  • cisconetworking
  • Leos
  • anitta
  • tester
  • JUstTest
  • All magazines