Revert back to a specific commit in git, build, then revert to the latest changes
There has been some question on reverting back to a commit in git but I wanted to make sure. This SO page is one that helps the most: GIT revert to previous commit... how?
I have a previous commit, say 1.0 for a customer and it is complete. I commit (not sure if I push) and then create a new branch to work on the next version. Now, for some reason, the binary for 1.0 is "corrupted" and I need to go back but also keep the current modifications.
git log reveals this:
Author: Yko <email@example.com>
Date: Mon Apr 25 10:25:35 2011 -0400
So, the steps I need to take is this?
1. git add .
2. git commit "good stopping point for v1.1"
3. git checkout be01...
I am assuming step #3 modifies all the source code? This is an XCode project (iPhone app) so I just have to reload the project file, build, and have the new binary .app?
Then, goes back to the latest version 1.1 with
git checkout "latest commit #"?
I'm new and don't want to lose any work. Appreciate the help!!!
EDIT: Based on a few answers, I want to clarify. 1. I do not want to merge any branches. I want to go back to version 1.0 and rebuild the source to create a new binary then hop back to where I was. Suppose verision 1.0 have apples to be $1.00 and version 1.10 have apples to be $1.10. I want to go back to version 1.0, rebuild the source code where apples are $1.00, give the binary to customer x. Then, hop back to version 1.10, keep working on it.
We accidentally merged branch XYZ into DEV and pushed it to the origin repo. This was done with --no-ff to create a separate merge commit. As soon as I realized the wrong merge, I did a git revert to
I'm using git flow for my projects. When a release has been merged into the master branch it is tagged with the release version (e.g. 1.2.0) and deployed to my production servers. Now I want to quickl
I commited something wrong twice. How to revert two commits back and commit only good stuff ?
Just ran a git reset --h by accident. I had lots of modified files, and a few new files. Previous to the reset, I hadn't created a commit, so I can't look in the reflog and revert back to a commit. Te
Is it possible to do git reverts in Egit to rollback changes by creating a new commit (as opposed to checking out an older commit or doing a hard reset which doesn't create a new commit rolling back
I commit a git repository at first time, I then regret the commit and want to revert it. I try # git reset --hard HEAD~1 I get this message: fatal: ambiguous argument 'HEAD~1': unknown revision or pa
I've found instructions on how to revert a single file in a git repository to an earlier version, but am curious if anyone knows of a way to do this through the git extensions for visual studio? This
I made several commits (commit1/2/3), I changed my working directory without stashing. Then I wanted to go back several commits ago. So I git revert commit1 commit2 commit3, but I was told to commit m
I have created one new branch X Then I merge this branch with local master and push local master to origin Then I do more changes on branch X I would like to push these changes to origin but on origin
This question already has an answer here: Revert to a previous Git commit 11 answers My repository is a mess right now... I have a messed up merges and commits... I want to go back to a specifi
So I just did a git --reset soft to go back to a previous commit. Now what if I want to go back to the latest commit that I was at before? i.e: the latest commit? I tried doing git log, but the commit
Is it possible to revert a commit or merge in Aptana? I only have found the option to revert untagged changes. But is it possible to revert certain commits or a merge with Aptana or do I have to use
I just made a git reset--hard command by accident. Can this git action somehow be reverted? I want to obtain back the uncommitted changes. I am using git from the command line. Can I obtain the code f
So, I ended up having to change the whole directory tree of my project because of a fundamental problem with my code - or so I thought. So I made a commit before the big changes, then I realized after
I accidentally reverted all my changes with bzr revert before committing. Are all my changes lost or can I undo the revert somehow? I haven't lost many changes, but I'd enjoy to know if there is a saf
I have the following situation: master A - B - E / second C - D - F What is the best solution to revert all commits of 'second branch' from master branch? The 'second' branch has about 70 commits.
If I have a form with controls DataBound to an instance variable object, is there a way to do revert changes that the user made, possibly by doing something like: myLocalObject = DataLayer.GetCurrentS
Uh oh... I mistakenly committed a pretty complex change (including subdirectory and files renames) without really knowing what I am doing (or what Git would be doing). I now want to undo everything su
hg backout tip seem to also revert all your files back to the older version. Is there a way to change it back to EXACTLY like before the commit -- that is, with several files Modified but uncommitte
I am trying to learn how to restore or rollback files and projects to a prior state, and don't understand the difference between git revert, checkout, and reset. Why are there 3 different commands for
I have an element when you hover over it changes the css I have added a onkeydown function that reverts back to the original css. I was just wondering if there was anyway of getting the unhovered css
I was trying to install Android Studio and import a project from eclipse. So i export following the documentation steps : i build gradle file. Now on my Eclipse IDE, I have an error on the 4th line be
How in Dart Editor revert back (turn off) an option Don't Analyze script? I turn on this option on a script but I don't know how to turn it off on this script (allow to analyze).
Does have a commit int the git history same hash after geting into the same state? For example after revert? It is possible that there are more commits for one hash? Let us suppose history commit numb
I use Git with SourceTree (from Atlassian). I can revert a commit, but this makes a commit with an auto description: Revert... I want to revert a commit while entering my own description.
I am using Editor Grid,I need to revert back modified records,Right now am using refresh() but it refreshes entire modified values,I need to revert back only specific records so any another function a
On github we are at commit 57d7cb274622f86e586c2595317264f23626e6c5 I want to revert to commit 5798ee7c56efd7e898d3115da6efe3d5e7cddb6c which is several commits before the latest one. Here is what I a
I used git filter-branch and screwed something up and accidentally rewrote sections of the history I didn't want to. I was trying to change one name and accidentally changed every single commit (inste
I have done some stuff to my git repo and I think I am digging the hole deeper. Right now I just want to be able to get all my current files in the state they were when I last pushed to github. Howeve
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?
Here's my history for the folder 'somefolder' $ git log somefolder commit 89cd More changes to somefolder commit ef47a Updating somefolder and other stuff commit e095 Bugs fixed in somefolder I want t
yesterday little time before to go out, I made a revert on a few files not commited yet. Now I try to explain my situation. Yesterday I worked on a few new files inside a package, before to go out, I
Our Project is using CVS and its is integrated from eclipse and so we use Team Synchronizing to get the latest code from CVS but is there a way to revert the previous commit or update from repositry w
I want to do a revert of a commit, but only for some files. (Not a checkout; a revert. If you are unfamiliar with the difference, keep reading.) I tried this git revert --no-commit abcdef123456 -- my/
this is how I understand submodules: Independent repositories with states (commit-id's) that are recorded in a main repository to be able to revert the entire state at a particular point in time. But
I need to export to an archive a set of commits in a git repository. How do I do this? Using svn, I could choose commits and export to zip.
I'm confused. I want to go back to a previous commit that I identified in git log. But when I do git checkout , I don't get said commit. Nothing changes. It tells me I'm in detached HEAD mode, but
Is it possible to revert back the installed package(if any content modified with package installation) in CQ5 from the package manager console.?
When we run 'git revert HEAD~9', here is the error: $ git revert HEAD~9 error: could not revert 45ebde6... AC: added stat summary function hint: after resolving the conflicts, mark the corrected paths
I have been using the JEditable plugin for JQuery and I would like to return errors to the plugin to instruct it to revert to the previous value and also display an error to the user. I have this work
I'd like to see the file from a specific commit in the past, I'm thinking of git reset --hard but I won't be able to see the commits beyond that commit. How do I go back to a commit (together with the
I was doing some test about complex .NET databinding, and i need to have some advice in order to rollback changes made by the user. Let's assume, for example, that i've got 2 classes in my BL layer:
How does one revert a file to its previous version in tortoise SVN using the GUI ?
I have a build system that takes a git repository, goes back to a specific commit, and then uploads those files some where. Then is goes back to master. I'm unsure that I'm using the right Git command
I'm facing a situation where I have accidentally done a git rm foo.c before committing it even once. So, it was completely untracked by git and yet the file was physically deleted. I have already trie
I have made several commits on different files, but so far I would like to push to my remote repository only a specific commit. Is that possible?
If you do an hg pull and then an hg update (or an hg merge), is there a way to back this out? Ie: revert your repository to the state prior to doing the hg pull? I believe you can do hg update -r n w
This question already has an answer here: Undo a Git merge? 16 answers This question is different from other questions in that, I want to keep some commits while I revert some commits. Here 's
When i was on point D in my project I've made some changes to my project and push several commit (E,F,G,H) to git so i am in point H. Now i have to make new change (I) and push them to git and deploy
I did a git commit -m message like this >git commit -m save arezzo files # On branch master # Changes not staged for commit: # (use git add <file>... to update what will be committed) #