Re: Newbie falls at first hurdle
- From
Alan Chandler <alan@chandlerfamily.org.uk>
- Date
- Sep 18, 2005, 19:11 UTC
- Message-ID
- <200509182011.10689.alan@chandlerfamily.org.uk>
- In-Reply-To
- <7vek7m5m0z.fsf@assigned-by-dhcp.cox.net>
On Sunday 18 Sep 2005 18:22, Junio C Hamano wrote:
> Alan Chandler <alan@chandlerfamily.org.uk> writes:
Show 7 quoted lines
> > Still struggling with how to cherry pick parts a previous > > update (between possibly two other branches) and apply them to > > a current branch - all the tutorials assume you want it all, > > and I can't really understand what the cherry pick commands do > > from their manuals. > > An example to pick a couple of commits from one branch to another.
I understood your example (on the assumption I don't really care what pu^2~2 actually means as its copied from a list) and that is a new piece of useful information that I didn't have before, (and which I would have used several times this afternoon had I known) but its not exactly what I meant.
Before using git I had made a lot of unrelated changes to my working directory, some of which were bad. The only way to get a snapshot before I made it bad (trying to hack a combination CSS and dynamically created html to get it to do what I want - mind breaking:-( ) was to go back to the previous days backup of the whole working directory.
It was this mess I had got myself into that kicked me into getting into git, rather than waiting for the 1.0 release, which had been my previous plan.
I effectively loaded both my current code and the day before's backup into git as two separate branches.
What I was then trying to do, via various attempts with git diff -p was to extract small chunks of updates (ie limit scope over a few files). Edit the result to limit the diff to cover a small update and then apply it to a my current stuff to slowly undo some of the mess that I had made.
Being new to git, meant reading man pages all the time - which was making it slow progress (and which wasn't helped by realising I had an old version of the man pages installed part way through :-( ). In the end it was easier to manually retrace my steps by typing in the changes I needed.
-- Alan Chandler http://www.chandlerfamily.org.uk