'Will git revert on my last commit that failed to push show me my modified files back in source control explorer?

QUESTION - If I perform a git revert on the last commit '28ea268...', will it show me my modified files again in Source Control Explorer in VS Code?

FYI - My last commit ('28ea268...') failed to push the files (see below) because of a large +100MB file that was added after I upgraded to Angular 13 from 12. I don't see any new files or changes in Github.com when I check. It committed according to git log, but nothing was pushed to my repo after failing to do so, according to the git output(see below)

Git log:

commit 28ea268d8e0a51e93f74e36e789aa0a3d2e1704a (HEAD -> master)
Author: chuck <[email protected]>
Date:   Sun Mar 20 22:23:32 2022 -0700

    mods from new MBPro14

commit f480f417d4c126067c95c0778cb2132fa0dfced6 (origin/master, origin/HEAD)
Author: chuck <[email protected]>
Date:   Fri Mar 18 19:42:40 2022 -0700

    mods

Git output

[2022-03-21T06:14:33.091Z] > git push origin master [29424ms] [2022-03-21T06:14:33.091Z] remote: error: Trace: 47b6ad853b68f1ff7b533b5b9e1e44880272a4bcbf979e9f8afb162aa47ef3a9
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File client/.angular/cache/13.3.0/angular-webpack/5ebe13da59e6342699441237cc06e261c0793966/35.pack is 113.88 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.

Source control explorer in VS Code (empty):

enter image description here



Solution 1:[1]

If I perform a git revert on the last commit '28ea268...', will it show me my modified files again in Source Control Explorer in VS Code?

No, git revert makes a new commit which undoes the commit in question. You will have two commits, the original and the one which undoes it.

Since your original commit with the large file still exists, you will still not be able to push.

Instead you need to redo commit 28ea268. You can do that with reset --soft HEAD^. This moves your branch back one commit (that's the HEAD^ part) but leaves your files alone. You will see your changes. You can get rid of the large file and commit again.

See Reset Demystified for more.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Schwern