Eric at Lucii.org on 25 Oct 2012 09:34:01 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] git-fu


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks, that makes sense.

On 10/25/2012 12:13 PM, Adam wrote:
> Commit your changes then
> 
> git reset --hard head~1
> 
> That will set you one commit back. Then
> 
> git checkout -b branch_name
> 
> Will put you on a new branch
> 
> On Oct 25, 2012, at 12:04 PM, "Eric at Lucii.org" <eric@lucii.org> wrote:
> 
> 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.
> 
> Eric
>> ___________________________________________________________________________ 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
> 
> 

- -- 
#  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/

iEYEARECAAYFAlCJac8ACgkQ2sGpvXQrZ/5aKQCdHvp6eXrdkA7hosQQQcr3j8T8
ffEAn2Jje5Np1NSVf8A3jYoLUkw/WzQd
=IIiI
-----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