You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would love to be able to see my local history for a file like you can do in intelliJ.
Reacted by Alive, Hari Prasad, Hylke, Rob Pocklington, Matt, Piero, esteban, Dmitry, Christophe Wagner, jan h and 419 more
Reacted by Caio Coelho, Eli Dowling, pseudocoder, Šimon Demočko, Alex Wilson, FR073N, Akter Hossain, Micael Illos, Ani Mheryan, picksaas and 32 more
Reacted by Alkor San, Jesse Khorasanee, Santhosh, czombos, Oleg K, Yurii Holskyi, Kate Sawyer, Elio Rivero, Caio Coelho, Eli Dowling and 70 more
Reacted by Yurii Holskyi, Kate Sawyer, Elio Rivero, Caio Coelho, Kostiantyn Popovych, pseudocoder, Šimon Demočko, Serhii Popov, Alex Wilson, FR073N and 35 more
Reacted by Yurii Holskyi, Kate Sawyer, Elio Rivero, Caio Coelho, Eli Dowling, pseudocoder, Alex Wilson, FR073N, Emmanuel B., Micael Illos and 33 more
That would be amazing. Jetbrains has probably the best local history support. There are a couple of extensions for VS Code but they aren't as convenient.
Reacted by Jesse Khorasanee, dolphin, hlai, Oleg K, Yurii Holskyi, Shivendra Kumar, Wilberforce Uwadiegwu , glenn-axsy, pseudocoder, Clemens Jütte and 30 more
Reacted by pseudocoder, pwnreza, Sporterer and Carlos Parada
Can anyone please suggest - "How can I see my local file history changes in VS code like we can check in eclipse IDE? Sometimes we do changes a lot in single file before commit and this feature can be really handy to check entire day's changes in one file. I have checked few plugins like "Local History" but the changed files keep on adding in my git changes section and changed file numbers keep on increasing. I doubt if I am using it correctly. Please suggest best plugin or options for it. Thanks
For reference, there is an extension, but it's not nearly as powerful as what's offered in IntelliJ/WebStorm.
Examples of features that I'd like to see if this were to be implemented:
Being able to add checkpoints (local commits). This is the IntelliJ equivalent to adding tags to your history. There is another extension for that here, though.
Being able to support local history when the files are moved/renamed.
Being able to revert more than just edits (e.g. deletes, moves).
Here's a horror story. I had all my files tracked in Git and began writing code for a new feature that used an API at the end of a file, so my workspace had uncommited changes. Because I had to wait for approval for more API quota to continue developing and testing my code and because my code wasn't yet commit worthy, I continued work on other projects and forgot I had uncommited changes in that repository.
A few days later I was experimenting with some VS Code features and I needed to purposefully create some linting errors in a file to test it out, so I opened that same repository and randomly deleted a few lines at the top of the file I had been working on a few days before. I mistakenly thought I could just "discard changes" in the Source Control tab and Git would bring my file back, reinserting the lines I deleted. I closed the file, losing the ability to undo (cmd+z) the deleted lines. As I was ready to reverse the deleted lines, I hopped onto the Source Control tab and only seeing the deleted lines at the top of the file (I did not look at the Ruler on the right hand side to see I had more uncommited changes), I pressed "Discard Changes".
A few days later my request for API quota was approved and I reopened the file. As I scrolled to the end of the file my jaw dropped and I started replaying this cute little story in my head, trying to understand out how the hell had I figured out a way to permanently delete my own work.
TL;DR
Local history would have saved me from having to spend a few minutes (but it could have been hours or days) rewriting permanently lost code.
I would love an ETA on this feature and a comment on what's blocking it from being shipped.
Reacted by Oleg K, harutyundr, André Casal, Danation, Cattī Crūdēlēs, thehighvaluemen, Senthilkumar and Carlos Parada
Yeah that site is really helpful, I use it a lot. I think interval might be a bit misleading because as a user you might think that now a local history entry is created every 10s even without user action. For example setInterval in JavaScript installs a function that will run every <n>ms.
Badr Elmers (@badrelmers) the setting itself is a number as seconds though, so I would like to have some kind of reference to time in the settings key.
It seems to be impossible to go back to the old behaviour, which is to have a single timeline item called "uncommitted changes". This makes it very hard for me to see what I have changed since the last pull, without painstakingly going through each individual timeline item and memorising the full diff between each version.
Storing local history is very useful, but could we have a switch to easily toggle between showing:
All individual local saves
All uncommited changes together (i.e. merged)
Turning off the new local history feature in workspace settings seems to show just the git timeline without any information about uncommitted changes.
Reacted by maurobalbi, Jorge R. Sarabia, Carmen Bello and Drab1g
Uncommitted changes are accessible from the SCM changes view:
I did not test the proposal, but it would be useful to tag history entries in relation to SCM. If the latest committed state was flagged, that would facilitate the use case of Jimbo (@jacrosby) (as long as that entry is still in history...)
I want to thank everyone involved so much for this feature.
Last week I was able to recover 3 days of work after hitting delete on samba share directory that contained a symlink. photorec and ext4magic couldn't restore the files from my ext2 fs partition.
I figured its all gone when I did a final grep through the vscode-insiders-server folder and found the all of the code in perfect condition. I was so happy!
Reacted by Jonas Sander, heartacker, Petr Rajtslegr, andres-pcg, IgniPanda and André Casal
Reacted by Benjamin Pasero, Isidor Nikolic, Petr Rajtslegr, andres-pcg, Pranjal Jain and Madhur Malpani
Activity
taseenb commentedon Sep 15, 2017
That would be amazing. Jetbrains has probably the best local history support. There are a couple of extensions for VS Code but they aren't as convenient.
alkorsan commentedon Oct 29, 2018
please add this option please
I m afried of Git, and this story make me more afreid of using it.
single programers we don t need all the git complexity.
MarekJavurek commentedon Mar 14, 2019
+1 (just few mins ago, wanna discard some changes in just few files... discarded all unstaged files...)
nancycg commentedon Jun 13, 2019
Can anyone please suggest - "How can I see my local file history changes in VS code like we can check in eclipse IDE? Sometimes we do changes a lot in single file before commit and this feature can be really handy to check entire day's changes in one file. I have checked few plugins like "Local History" but the changed files keep on adding in my git changes section and changed file numbers keep on increasing. I doubt if I am using it correctly. Please suggest best plugin or options for it. Thanks
jabacchetta commentedon Jul 22, 2019
For reference, there is an extension, but it's not nearly as powerful as what's offered in IntelliJ/WebStorm.
Examples of features that I'd like to see if this were to be implemented:
This feature set also has synergy with #43555, #52844, and #9390.
faldor20 commentedon Aug 17, 2019
This is something that would be super helpful. even just to be able to save undo across sessions would be amazing.
andrecasal commentedon Oct 4, 2019
Here's a horror story. I had all my files tracked in Git and began writing code for a new feature that used an API at the end of a file, so my workspace had uncommited changes. Because I had to wait for approval for more API quota to continue developing and testing my code and because my code wasn't yet commit worthy, I continued work on other projects and forgot I had uncommited changes in that repository.
A few days later I was experimenting with some VS Code features and I needed to purposefully create some linting errors in a file to test it out, so I opened that same repository and randomly deleted a few lines at the top of the file I had been working on a few days before. I mistakenly thought I could just "discard changes" in the Source Control tab and Git would bring my file back, reinserting the lines I deleted. I closed the file, losing the ability to undo (cmd+z) the deleted lines. As I was ready to reverse the deleted lines, I hopped onto the Source Control tab and only seeing the deleted lines at the top of the file (I did not look at the Ruler on the right hand side to see I had more uncommited changes), I pressed "Discard Changes".
A few days later my request for API quota was approved and I reopened the file. As I scrolled to the end of the file my jaw dropped and I started replaying this cute little story in my head, trying to understand out how the hell had I figured out a way to permanently delete my own work.
TL;DR
Local history would have saved me from having to spend a few minutes (but it could have been hours or days) rewriting permanently lost code.
I would love an ETA on this feature and a comment on what's blocking it from being shipped.
kboshold commentedon Nov 12, 2019
I would love this feature! 😍
56 remaining items
bpasero commentedon Mar 22, 2022
Yeah that site is really helpful, I use it a lot. I think
intervalmight be a bit misleading because as a user you might think that now a local history entry is created every10seven without user action. For examplesetIntervalin JavaScript installs a function that will run every<n>ms.andrecasal commentedon Mar 22, 2022
I vote for
debouncefor the sake of accuracy.Interval,frequency, anddelaydon't really capture what it is.bpasero commentedon Mar 22, 2022
Another idea I had was
mergeWindow.windowseems to describe a time span and somergewould occur in a certain time span.Though
windowis a bit of a overloaded term, especially in an application that has a lot ofwindowUI settings.badrelmers commentedon Mar 22, 2022
I vote for the word merge too. how about
mergeChangesbpasero commentedon Mar 22, 2022
Badr Elmers (@badrelmers) the setting itself is a
numberas seconds though, so I would like to have some kind of reference to time in the settings key.badrelmers commentedon Mar 22, 2022
yes. then why not
mergeChangesInterval?andrecasal commentedon Mar 22, 2022
A few more suggestions:
saveDebounceInterval<- my current preferencemergeDebounceIntervalhistory - rename setting `mergePeriod` to `mergeWindow`
jacrosby commentedon Mar 31, 2022
It seems to be impossible to go back to the old behaviour, which is to have a single timeline item called "uncommitted changes". This makes it very hard for me to see what I have changed since the last pull, without painstakingly going through each individual timeline item and memorising the full diff between each version.
Storing local history is very useful, but could we have a switch to easily toggle between showing:
Turning off the new local history feature in workspace settings seems to show just the git timeline without any information about uncommitted changes.
bpasero commentedon Mar 31, 2022
Uncommitted changes are accessible from the SCM changes view:
The decision to remove the entry from timeline was discussed in #145723
jacrosby commentedon Mar 31, 2022
This should be something you can toggle between. And if you turn off local history then it should definitely still be shown.
Chealer commentedon Mar 31, 2022
I did not test the proposal, but it would be useful to tag history entries in relation to SCM. If the latest committed state was flagged, that would facilitate the use case of Jimbo (@jacrosby) (as long as that entry is still in history...)
bpasero commentedon Mar 31, 2022
There is currently no relation between SCM entries and history entries, they are 2 independent providers of timeline entries.
nidefawl commentedon Apr 4, 2022
I want to thank everyone involved so much for this feature.
Last week I was able to recover 3 days of work after hitting delete on samba share directory that contained a symlink. photorec and ext4magic couldn't restore the files from my ext2 fs partition.
I figured its all gone when I did a final grep through the vscode-insiders-server folder and found the all of the code in perfect condition. I was so happy!