"Backing out" is done with git reset --hard last_good_commit. Often the name
of the last good commit is HEAD^, the last commit. However, after a botched
merge it is good to verify that with git log or graphically with gitk.
If you've pushed a commit to a public repo and then it later turns out that
the commit wasn't a good idea, then you want "git revert" which creates the
reverse patch for a given commit. However, if you make a real hash out of a
public repo you may still want git reset.
Tim
On Tue, Feb 8, 2011 at 8:04 PM, Anders Gidenstam
<anders-...@gidenstam.org>wrote:
> On Tue, 8 Feb 2011, Curtis Olson wrote:
>
> > I made a commit into a branch of a --local clone of my fgdata repository.
> I
> > pushed that to the matching branch in my main fgdata.git repository.
> >
> > Then I attempted to merge one commit into the master branch ... however
> it
> > merged *all* my changes.
> >
> > How can I back this out (I've made some hacks to some f-14b nasal files
> > which are intended for personal expermentation and break standard
> behavior.)
> >
> > How can I cherry pick one particular commit to merge into the master
> branch?
>
> Backing it out might be a bit tricky, but you can rename your messed up
> branch out of the way easily with git branch -m oldname newname.
>
> To cherry-pick commits from your other repository into a branch you first
> fetch the branch you want to pick, e.g.
>
> git fetch theOtherRepro.git theotherbranch:suitableName/theotherbranch
>
> Or just theotherbranch:suitableOthername
>
> Then you can inspect the commits on it with
> git log -u theOtherRepro/theotherbranch
>
> And finally cherry-pick the one you want with
>
> git cherry pick <commitID>
>
>
> I always use a clean local copy (e.g. git branch -t mrClean origin/master)
> of origin/master to cherry-pick commits to before pushing to origin.
> I leave that branch around since the next time I just need to check it
> out, do git pull which will be a clean fast forward and cherry-pick and
> push again.
>
> Cheers,
>
> Anders
> --
> ---------------------------------------------------------------------------
> Anders Gidenstam
> WWW: http://www.gidenstam.org/FlightGear/
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel