Changes not staged for commit with current master

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Changes not staged for commit with current master

martin rudalics
git status for master currently tells me

Changes not staged for commit:
   (use "git add/rm <file>..." to update what will be committed)
   (use "git checkout -- <file>..." to discard changes in working directory)

        deleted:    src/bitmaps/README
        deleted:    src/bitmaps/cntrpmsk.xbm
        deleted:    src/bitmaps/cntrptr.xbm
        deleted:    src/bitmaps/crosswv.xbm
        deleted:    src/bitmaps/dimple1.xbm
        deleted:    src/bitmaps/dimple3.xbm
        deleted:    src/bitmaps/gray.xbm
        deleted:    src/bitmaps/gray1.xbm
        deleted:    src/bitmaps/gray3.xbm
        deleted:    src/bitmaps/leftpmsk.xbm
        deleted:    src/bitmaps/leftptr.xbm
        deleted:    src/bitmaps/rtpmsk.xbm
        deleted:    src/bitmaps/rtptr.xbm
        deleted:    src/bitmaps/stipple.xbm

What am I supposed to do with them?

TIA, martin

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Changes not staged for commit with current master

Yuri Khan-2
On Mon, Aug 7, 2017 at 2:59 PM, martin rudalics <[hidden email]> wrote:
> git status for master currently tells me
>
> Changes not staged for commit:
>   (use "git add/rm <file>..." to update what will be committed)
>   (use "git checkout -- <file>..." to discard changes in working directory)
>
>         deleted:    src/bitmaps/README
[…]
>         deleted:    src/bitmaps/stipple.xbm

Git is saying that your working tree is missing several files that are
present in the repository revision.

> What am I supposed to do with them?

Depends on what you want to achieve.

If you want to author a commit that deletes these files:

    …/emacs$ git rm src/bitmaps/README […] src/bitmaps/stipple.xbm
    …/emacs$ git commit -m […commit message…]

Alternatively, if you deleted them accidentally (or they got deleted
and you do not know why), you can restore them this way:

    …/emacs$ git checkout -- src/bitmaps/README […] src/bitmaps/stipple.xbm

Or, if you do not have any work in progress, you can reset your
working copy to the state of the current revision:

    …/emacs$ git reset --hard

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Changes not staged for commit with current master

martin rudalics
 > Alternatively, if you deleted them accidentally (or they got deleted
 > and you do not know why), you can restore them this way:

I must have deleted this directory when I cleaned up those .deps files
recently.  Messing with git-ignored files can be hazardous.

 > Or, if you do not have any work in progress, you can reset your
 > working copy to the state of the current revision:
 >
 >      …/emacs$ git reset --hard

That's what I've done now.

Thank you very much for the prompt help, martin


Loading...