I cloned a site repository for a Drupal 7.6 site. I then copied working 7.12 core files on top of it. I have not added or committed the changes. I need to go back to the original code. I tried "git revert" and it wanted some more parameters that don't make sense to me. "Git pull" listed all the changes and then said that everything was still on "master" and the site still shows as having 7.12.
Other than redoing the "git clone" is there a "right" way to back out the update?
Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
git reset --hard HEAD will set your files back to whatever is currently committed.
On Mar 30, 2012, at 8:35 AM, Ms. Nancy Wichmann wrote:
I cloned a site repository for a Drupal 7.6 site. I then copied working 7.12 core files on top of it. I have not added or committed the changes. I need to go back to the original code. I tried "git revert" and it wanted some more parameters that don't make sense to me. "Git pull" listed all the changes and then said that everything was still on "master" and the site still shows as having 7.12.
Other than redoing the "git clone" is there a "right" way to back out the update?
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
[ Drupal support list | http://lists.drupal.org/ ]
What you want is git reset --hard
________________________________
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Ms. Nancy Wichmann Sent: Friday, March 30, 2012 8:36 AM To: support drupal Subject: [support] Backing out update
I cloned a site repository for a Drupal 7.6 site. I then copied working 7.12 core files on top of it. I have not added or committed the changes. I need to go back to the original code. I tried "git revert" and it wanted some more parameters that don't make sense to me. "Git pull" listed all the changes and then said that everything was still on "master" and the site still shows as having 7.12.
Other than redoing the "git clone" is there a "right" way to back out the update?
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
you might also have a bunch of untracked files, so after the 'git reset --hard' you can do 'git clean -d -f .'
'git help reset' and 'git help clean' will shed more light if you're interested.
-Benj
On Fri, Mar 30, 2012 at 9:46 AM, Ms. Nancy Wichmann nan_wich@bellsouth.netwrote:
Thanks Steve and David. That did it.
*Nancy*
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
*From:* "Metzler, David", Steve Edwards
What you want is git reset --hard
-- [ Drupal support list | http://lists.drupal.org/ ]