[petsc-dev] moronic git

Aron Ahmadia aron at ahmadia.net
Sun Nov 17 13:39:04 CST 2013


> I made the changes in a branch than deleted the branch and expected the
changes to go away

A branch is a pointer to commits.  It has nothing to do with your working
tree.

You want changes to go away, either use "git checkout file" for each file
you want to reset, or "git reset --hard" to reset your entire working
directory to a specific commit.

Different procedure for staged commits.  Are you trying to clean up your
working directory or your staging area?

A


On Sun, Nov 17, 2013 at 2:33 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
>   Yes, but why is there any changed shit in my current HEAD? I made the
> changes in a branch than deleted the branch and expected the changes to go
> away. How the hell do I make the changes go away that were in the branch I
> deleted? Is a branch then not the changes one made in it?
>
>
>
> On Nov 17, 2013, at 1:09 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
> > Barry Smith <bsmith at mcs.anl.gov> writes:
> >
> >>  What part of delete does git not understand? How the f do I get rid of
> the damn branch completely  so I can create a new one with the same name
> and use it?
> >>
> >>
> >> ~/Src/petsc/src/ts/examples/tutorials/advection-diffusion-reaction
>  master $ git branch -D barry/saws-update
> >> Deleted branch barry/saws-update (was 9f236db).
> >
> > This really deleted the branch.
> >
> >> ~/Src/petsc/src/ts/examples/tutorials/advection-diffusion-reaction
>  master $ git branch barry/saws-update
> >
> > This created a new branch at your current HEAD.
> >
> >> ~/Src/petsc/src/ts/examples/tutorials/advection-diffusion-reaction
>  master $ git checkout barry/saws-update
> >> M       include/petscoptions.h
> >> M       include/petscviewer.h
> >> M       src/sys/classes/viewer/impls/string/stringv.c
> >> M       src/sys/objects/aoptions.c
> >> M       src/sys/objects/options.c
> >> M       src/sys/objects/pinit.c
> >> Switched to branch 'barry/saws-update'
> >
> > This checked out that branch, so HEAD points at the new branch, but the
> > working tree is the same, and Git tells you what is modified in your
> > working tree.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131117/34236afe/attachment.html>


More information about the petsc-dev mailing list