Dylano236
Dylano236

Reputation: 317

Revert unstaged changes on actual file Atom

I've been working with VS code for years and my git integration has a button that discards unstaged changes in git and on the actual file itself.

Been working with Atom editor now and I have everything set up perfect for git, except with I click discard or undo unstaged changes it takes them away in git but not on the file?

I've downloaded multiple git packages like Git-plus and git revert but nothing works?

Upvotes: 0

Views: 108

Answers (1)

TTT
TTT

Reputation: 28934

The pending changes you see from Git are the changes that Git sees on your local file system compared to the currently checked out commit. When you undo your pending changes, Git is re-writing your local file system to match your currently checked out commit. Since you did this, but the files are not changing in your editor, then this means your editor is not showing you the true state of the files. You can prove this by opening the files with a different editor to see the actual state.

Many editors will continuously monitor all the files you currently have open and notify you when a file changes out from underneath it, and it's common to offer you the option of reloading the file or leaving open the version as is in memory. Apparently your editor is not doing this, and maybe there's an option to enable it.

Upvotes: 1

Related Questions