[petsc-dev] Usability

Jed Brown jedbrown at mcs.anl.gov
Mon Mar 11 18:22:32 CDT 2013


On Mon, Mar 11, 2013 at 6:01 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> master ~/petsc$ git checkout b95f98c
> Note: checking out 'b95f98c'.
>
> You are in 'detached HEAD' state. You can look around, make experimental
> changes and commit them, and you can discard any commits you make in this
> state without impacting any branches by performing another checkout.
>
> If you want to create a new branch to retain commits you create, you may
> do so (now or later) by using -b with the checkout command again. Example:
>
>   git checkout -b new_branch_name
>
> HEAD is now at b95f98c... Merge subtree 'buildsystem/master'
>

Additionally, every place HEAD has been (which includes any commits you
make, etc) is remembered for 90 days (default). So if you commit something
here (with a detached HEAD), then switch away, do other stuff, and later
want to find it, it will still be in the reflog

$ git reflog --grep "something relevant"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130311/8e4cf954/attachment.html>


More information about the petsc-dev mailing list