revert

How to revert/recover .m file to a previous version? (autosaved blank by mistake and xcode crashed - no Source Control, no Time Machine)

霸气de小男生 提交于 2019-12-21 16:34:01
问题 I've tried to search for the answer but I cannot precisely define the terms without falling under wrong threads all the time. What happened: Accidentally I've selected all the code inside a file.m and deleted it all. It became a full blank document . When I pressed Ctrl+Z to UNDO it, the xcode crashed . The problem: When I reopened the xcode (after the crash) , the file was still all blank ( It was autosaved seconds before the crash as a blank document ) - losing all my code . I could not use

Rolling an evolution back

久未见 提交于 2019-12-21 07:07:42
问题 This question might seem stupid, but I cannot find any instruction on how to roll back an evolution in Play 2.0. Google only finds pages which say that the "Downs" section of an evolution file is used for that and that's all. Any pointers or instructions will be appreciated. 回答1: The Downs part is mainly used to revert an Evolution when the script has changed. That is, you have a project with 2.sql applied to the database and then, due to a merge, 2.sql is modified in the source. Play will

What is the difference between hg revert and hg backout?

你离开我真会死。 提交于 2019-12-21 03:18:11
问题 Both hg revert and hg backout revert changes made by a former revision. What is the difference between the two? 回答1: Given the history of changesets: A --- B --- C --- D --- E [bad] (*) hg revert -r B : Stay at current revision, but update the working directory as of revision B . It has the effect of a patch that revokes the changes of C , D and E . hg backout -r C : Update the working directory so that it contains the merge of revision C's parent ( B ) and the current revision, preserving

Mercurial: Revert a single hunk

本秂侑毒 提交于 2019-12-20 17:38:36
问题 How do I revert a single hunk in Mercurial, similar to the way it's done in darcs, i.e. it asks me for each hunk and file whether I want to revert it? Is it possible using TortoiseHg? Thanks 回答1: The record extension is inspired by darcs record . It will allow you to add only specific hunks to the next commit, i.e., the opposite of what you want. But you could add all hunks except the one you want to revert and then do a hg revert to revert it. A little backwards, I know... :-) You could also

Reset/revert a whole branch to another branches state?

最后都变了- 提交于 2019-12-20 17:36:50
问题 I have a branch A and a branch B (and some other branches). Lets say A 's commit history looks like: commit 5 commit 4 commit 3 ... And B 's commit history: some other commit commit 4 merge of other stuff from branch C (into branch B ) commit 3 ... Basically what I want is to "delete" all changes made by the commits some other commit and merge of other stuff from branch C to branch B . I want the working tree of branch B to be exactly the same like branch A 's working tree. How do I achieve

What is the meaning of revert this commit and roll back this commit in GitHub for Windows?

假装没事ソ 提交于 2019-12-20 09:14:21
问题 Github for Windows features these two commands described as: revert this commit - create a new commit that reverts the changes of this commit rollback this commit - roll back this commit leaving all changes made in this and later commits in your working directory Could you explain the exact meaning of these two commands and how they can be used. Specifically I fail to understand what is the purpose of the second one. It makes no sense to me. Is it possible to revert to a previous commit check

svn: How to revert somebody else's commit?

半世苍凉 提交于 2019-12-20 07:13:58
问题 Argh, somebody (OK, my boss) added and commited all the files in his directory, meaning all the svn files: conf/, db/, format, hooks/, locks/... I'm using Tortoise, so I tried clicking on each one and doing revert, it said OK, but I still see all of them under version control after update/commit. We are now several versions past that. How do I clean things up ? Thanks 回答1: In Subversion, "revert" means to undo uncommitted changes to a working copy. What you're looking to do is to (effectively

Eclipse reverts all changes to file on key press, undo not possible?

ぐ巨炮叔叔 提交于 2019-12-19 03:23:07
问题 Somehow I just pressed some key or key combination in eclipse (android development) and eclipse suddenly restored the previous version of the file I was working on. CTRL Z/Y does not help. Do I have to do all my changes to the file again!?? And WHAT could I have just done? I don't want that to happen anymore. How could I possible continue working with eclipse knowing this could happen again sometime. Thanks, 回答1: I think I had the same problem and figured it out after a few minutes. Eclipse

SVN Revert Trunk, remove a revision as if it never existed?

安稳与你 提交于 2019-12-18 18:59:19
问题 Is it possible in the svn server to remove a revision as if it never existed? So we have the following revisions: 1004 // Commit of some bogus code that broke the build and was just wrong 1003 // Change 1.2 1002 // Change 1.1 1001 1000 *** Initial checkin Can we we remove the 1004 in svn and revert back to 1003 as if 1004 never existed? Forgive my ignorance, I'm still learning how to use SVN. 回答1: VCS systems are designed specifically to make this as complicated as possible. You usually do

Reverting specific commits from git

ⅰ亾dé卋堺 提交于 2019-12-18 10:17:05
问题 I have a git tree with a lot of commits and a lot of files. Now, I want to revert specific commits that touch a file only. To explain: > git init Initialized empty Git repository in /home/psankar/specific/.git/ > echo "File a" > a > git add a ; git commit -m "File a" [master (root-commit) 5267c21] File a 1 file changed, 1 insertion(+) create mode 100644 a > echo "File b" > b > git add b; git commit -m "File b" [master 7b560ae] File b 1 file changed, 1 insertion(+) create mode 100644 b > echo