![]() ![]() This will also work for changes to files that aren’t tracked by git, though in that case File > Revert would do the same thing anyway.įor this to work, the git_diff_target setting needs to be set to head and not index otherwise any partially staged changes will not be reverted because the incremental diff functionality doesn’t know that they exist. Similarly you could add it to the command palette or augment the menu, if you’d rather go that way. "file": "res://Packages/User/complete_revert.sublime-macro" git) that git_diff_target be set to "head". Requires that the mini_diff setting be enabled and (for was first opened or to the latest git commit (depending on the You can also bind it to a key if you like: // Revert the current file back to the state it was in when the file Invoking the macro from the Tools > Macros menu would revert all of the changes in the current file and leave the cursor at the first line for you. ![]() The Edit > Text > Revert Modification command will revert all of the modifications covered by the current selection state back, so if you select everything in the file and then use that command, everything should revert.įor example, given this User/complete_revert.sublime-macro macro file: [ mini_diff is true or "auto" in your user preferences) then you should be able to use that functionality to put the file back to the original state. If you’re using the built in git integration (i.e. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |