undelete

I TRUNCATEd a table. How do I get the data back?

馋奶兔 提交于 2019-12-24 04:51:15
问题 In my postgesql database, unfortunately I truncate this table mail_group , and the table is delete from the database, how to I get back this table. Kindly help me, waiting for reply. Thanks 回答1: Anyone else in the same situation: immediately stop your database with pg_ctl stop -m immediate (the immediate is important, you need to simulate a crash and prevent a checkpoint) then do not restart it. . If you had concurrent transactions still in progress you might be really lucky and PostgreSQL

How to “undelete” a deleted folder in Subversion / TortoiseSVN?

微笑、不失礼 提交于 2019-12-17 21:43:10
问题 We have accidentally deleted the 'tags' folder from our Subversion repository where we only intended to delete one specific tag. What is the easiest way to get the 'tags' folder back? We use TortoiseSVN as our client and I thought that when I go to the repo browser and show log, there will be something like "revert changes from this revision" similarly to what you can see in a similar dialog on your working copy. But there is no such command there... 回答1: Just copy the deleted folder back

How to undelete a file previously deleted in git's history?

时光毁灭记忆、已成空白 提交于 2019-12-17 17:46:06
问题 Using Chris's answer on another question I could prepend a snapshot-history to my git repository. Since one of the files is not part of my history but only in the snapshots, the first original commit now also contains the deletion of this file. How can I undo that? At first I thought this was the opposite of How do I remove sensitive files from git’s history, but actually I don't want to insert a file into history but just remove the deletion from history. 回答1: git checkout <commit> <filename

“Git Clean -fdx” recovery… possible?

浪子不回头ぞ 提交于 2019-12-11 17:31:32
问题 I probably did a huge mistake. relevant system info: Windows XP SP2 i686 Cygwin 1.7.6 git 1.7.1 I was trying to create an empty branch on a newly created git repository, here are the commands I just issued: git init git symbolic-ref HEAD refs/heads/klist rm .git/index <---- this command failed obviously, there was no index. git clean -fdx <---- this is my nightmare problem is I was not aware the clean command really deletes the files that are in the current folder, and as this was a newly

RESTful undelete

我怕爱的太早我们不能终老 提交于 2019-12-03 02:57:33
问题 It is a fairly common requirement to support undeletes or delayed/batched deletions for data services. What I'm wondering is how to implement this in a RESTful way. I'm torn between a few different options (none of which seems terribly attractive to me). Common across these different options, I believe, is the need for an API which returns all resource marked as deleted for a particular resource type. Here are some options I've thought about and some of their pros/cons: Options to mark

RESTful undelete

我的梦境 提交于 2019-12-02 16:31:45
It is a fairly common requirement to support undeletes or delayed/batched deletions for data services. What I'm wondering is how to implement this in a RESTful way. I'm torn between a few different options (none of which seems terribly attractive to me). Common across these different options, I believe, is the need for an API which returns all resource marked as deleted for a particular resource type. Here are some options I've thought about and some of their pros/cons: Options to mark resource as deleted: Use HTTP DELETE to mark the resource as deleted. Use HTTP PUT/POST to update deleted

How to “undelete” a deleted folder in Subversion / TortoiseSVN?

怎甘沉沦 提交于 2019-11-28 15:56:15
We have accidentally deleted the 'tags' folder from our Subversion repository where we only intended to delete one specific tag. What is the easiest way to get the 'tags' folder back? We use TortoiseSVN as our client and I thought that when I go to the repo browser and show log, there will be something like "revert changes from this revision" similarly to what you can see in a similar dialog on your working copy. But there is no such command there... Mikael Sundberg Just copy the deleted folder back from an earlier revision. In the Repository Browser, click the button labeled HEAD (at the top

How to undelete a file previously deleted in git's history?

本小妞迷上赌 提交于 2019-11-28 05:14:27
Using Chris's answer on another question I could prepend a snapshot-history to my git repository. Since one of the files is not part of my history but only in the snapshots, the first original commit now also contains the deletion of this file. How can I undo that? At first I thought this was the opposite of How do I remove sensitive files from git’s history , but actually I don't want to insert a file into history but just remove the deletion from history. git checkout <commit> <filename> Tobias Kienzler I got it: git tag originalHead # just in case git rebase -i <id of the parent of the

Undo delete in GIT

守給你的承諾、 提交于 2019-11-28 04:37:46
I made something very stupid. I made a commit using git commit (file edits + new files) (C). Then I made amend last commit. Then I deleted all files recursively (!) using git rm -r Then I made another git commit (C). A-B-C ↑ master Is there any way to undelete the files but keep the changes I had in my first commit? (C) I'd rather do not go back to (B). I tried git reset --soft head^, so then the git status lists files I deleted, then I did git checkout, but still no luck. I don't even know if it's possible. manojlds Do yourself a favour and do not do git checkout <hash> like the other answer

Undo delete in GIT

亡梦爱人 提交于 2019-11-27 00:33:13
问题 I made something very stupid. I made a commit using git commit (file edits + new files) (C). Then I made amend last commit. Then I deleted all files recursively (!) using git rm -r Then I made another git commit (C). A-B-C ↑ master Is there any way to undelete the files but keep the changes I had in my first commit? (C) I'd rather do not go back to (B). I tried git reset --soft head^, so then the git status lists files I deleted, then I did git checkout, but still no luck. I don't even know