Frank Szczerba on 25 Oct 2012 09:59:49 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] git-fu |
Actually, parts of git are written in perl (as well as Bourne shell, tcl, and, of course, C... I guess tmtowtdi applies here too). Frank On Oct 25, 2012, at 12:40 PM, "Eric at Lucii.org" <eric@lucii.org> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Thanks. > > See, I knew tmtowtdi was applicable even if git isn't perl. > > On 10/25/2012 12:14 PM, Julien Vehent wrote: >> On 2012-10-25 12:04, Eric at Lucii.org wrote: >>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >>> >>> My limited git skills are proving to be insufficient today. >>> >>> Background: I made some code changes and committed them. I subsequently made more changes but now I'm thinking I /may/ have gone down the wrong path. >>> >>> I'd like to go back to the last commit, create a branch, and try another approach in that branch. How can I do that without losing the current changes in the event I want to come back to them? >>> >>> Presumably, if the new branch works then I'd merge it into master (and then I don't care about what happens to the current changes.) >>> >>> I suspect tmtowtdi. >>> >> >> `git revert` will take you back to a previous commit, by creating a 'revert' commit that revert your changes. >> >> You can then revert the revert to get back your changes. >> >> I would: 1. revert 2. create a new branch 3. go back to master and either merge the new branch in, or revert the revert >> >> >> - Julien ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug >> >> > > - -- > # Eric Lucas > # > # "Oh, I have slipped the surly bond of earth > # And danced the skies on laughter-silvered wings... > # -- John Gillespie Magee Jr > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.11 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ > > iEYEARECAAYFAlCJa2UACgkQ2sGpvXQrZ/76ywCgtkvHHVNvnwGCuWeDZBdIz/yy > ObwAnR3+XGUsXMx+/uhvh/kGWirDd6ku > =Nili > -----END PGP SIGNATURE----- > ___________________________________________________________________________ > Philadelphia Linux Users Group -- http://www.phillylinux.org > Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce > General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug