revert

git revert back to certain commit [duplicate]

流过昼夜 提交于 2019-11-29 19:23:24
This question already has an answer here: How do I revert a Git repository to a previous commit? 41 answers how do i revert all my files on my local copy back to a certain commit? commit 4a155e5b3b4548f5f8139b5210b9bb477fa549de Author: John Doe <Doe.John.10@gmail.com> Date: Thu Jul 21 20:51:38 2011 -0500 This is the commit i'd like to revert back to. any help would be a lifesaver! git reset --hard 4a155e5 Will move the HEAD back to where you want to be. There may be other references ahead of that time that you would need to remove if you don't want anything to point to the history you just

Git: How to revert 2 files that are stubbornly stuck at “Changed but not committed”?

大憨熊 提交于 2019-11-29 19:04:31
I have a repo that has two files that supposedly I changed locally. So I'm stuck with this: $ git status # On branch master # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: dir1/foo.aspx # modified: dir2/foo.aspx # no changes added to commit (use "git add" and/or "git commit -a") Doing git diff says that the entire file contents have changed, even though from eyeballing it that seems untrue (there seem to be common line ranges that diff seems to be failing to see).

jQuery.draggable() - Revert on button click

戏子无情 提交于 2019-11-29 15:07:10
问题 I have several draggable & droppable elements on my page, which have accept properties. Currently my code is set up like: $(".answer." + answer).draggable({ revert: "invalid" , snap: ".graph" }); $(".graph." + graph).droppable({ accept: ".answer." + answer }); Therefore if the answer isn't correct, its reverted to its original position. The user also needs the ability to reset all on the page. I've tried the following, but it doesn't work: $("btnReset").click(function(){ $(".graph.A")

reverting push'd git commit

雨燕双飞 提交于 2019-11-29 13:05:05
问题 I've got a repo with two branches-- master and dev. I was working on the master branch and pulled, and got a message that the repo was up to date. I committed my changes, and pushed to the remote repo (on github). I got a message saying that some changes were rejected. I then did a git pull origin dev , which apparently was the wrong thing to do-- since it merged the dev branch with my master, and like an idiot I didn't notice this until I'd already pushed again. So the last commit shows

how to restore last saved code in eclipse?

喜你入骨 提交于 2019-11-29 11:01:14
In Eclipse, I accidentally SVN update my code to HEAD version of the repository. My local code is what I want to keep, so how do I revert to that? Tks. An easy way to do this: Right click on the file you would like to restore Go to Team Select Show Local History Choose the desired date Copy the content and paste in your actual file And it's done... Enjoy. You can access the local history in eclipse. Refer to this link http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fteam_synchronize_localhistory_example.htm 来源: https://stackoverflow.com/questions/8692484

Where is the 'Revert' option in Xcode 4's Source Control?

时间秒杀一切 提交于 2019-11-29 10:18:09
I'm using SVN in Xcode 4 as my source control; but can't see any option to revert to an older revision? Either a 'revert' or an 'update to revision' command? The 'Update' option always seems to update to the HEAD. Of course - I can do this on the command-line, but can't believe there's no way to do it within Xcode... Does anyone know where it's hidden? Or is there really no such option? Unfortunately the SCM functionality in 4.0 is fairly limited. You can commit, switch branches, branch/merge, diff previous versions, update to HEAD, but you can't revert. We all expect this to get better in

How to revert multiple commits as part of a single commit

主宰稳场 提交于 2019-11-29 02:47:34
This is not a major problem, just something I want to know whether or not is possible. Let's say we have two commits, abcd123 and wxyz789 , that occur at non-adjacent, separate places, far back in a repo's history. Now let's say we want to revert them. Doing git revert abcd123 wxyz789 would result in two separate commits, one reverting abcd123 and the other reverting wxyz789 . This is all fine and well, but what if the mistakes we want to fix in the two commits are logically linked, and for the purposes of self-documentation we'd like to make one single commit containing one single " I broke

Revert changes made by merge

天大地大妈咪最大 提交于 2019-11-29 00:04:42
问题 The developer was commiting small changes to two files. But during this commit, he had a merge conflict which deleted a lot of stuff (probably didn't have the last up to date version). Then it was pushed to the shared repo and some other developers did some other commits. Now, we noticed, that the merge deleted the important files, and we want to revert it back. How can I do this without losing the changes from the next commits? I was trying to git revert commitsha , but it didn't bring the

Reverting to a previous revision using TortoiseSVN

混江龙づ霸主 提交于 2019-11-28 16:25:19
问题 What is the easiest way to revert my working copy to a previous revision using Windows TortoiseSVN? I did not find any "findable" command to do that quickly. 回答1: There are several ways to do that. But do not just update to the earlier revision as suggested here . The easiest way to revert the changes from a single revision, or from a range of revisions, is to use the revision log dialog. This is also the method to use of you want to discard recent changes and make an earlier revision the new

Revert changes to a file in a commit

牧云@^-^@ 提交于 2019-11-28 15:22:19
I want to revert changes made by a particular commit to a given file only. Can I use git revert command for that? Any other simple way to do it? The cleanest way I've seen of doing this is described here git show some_commit_sha1 -- some_file.c | git apply -R Similar to VonC's response but using git show and git apply . Assuming it is ok to change the commit history, here's a workflow to revert changes in a single file in an earlier commit: For example, you want to revert changes in 1 file ( badfile.txt ) in commit aaa222 : aaa333 Good commit aaa222 Problem commit containing badfile.txt aaa111