#213 small
Ralf Ebert

Discard changes for new files in unstaged changes

Reported by Ralf Ebert | October 11th, 2009 @ 01:04 PM | in 0.8

When you click "Discard changes" from the context menu of a new file in the list of unstages changes, the file disappears from the list, but is not deleted. (I guess git checkout is used, which doesn't delete the file). If you refresh the list, the file is back again. I think "discard changes" for a new file means that the file should be deleted.

Comments and changes to this ticket

  • Johannes Gilger

    Johannes Gilger October 18th, 2009 @ 12:45 PM

    • Assigned user changed from “Pieter de Bie” to “Johannes Gilger”
    • State changed from “new” to “small”

    Thanks for noticing this.

    "Discard changes" shouldn't be applicable for a new file. A change is always something one can compare it with an earlier state. So we should completely get rid of the discard menu-entry for untracked files. We might want to implement a "Delete untracked file" entry, but I'm not the biggest fan of that for the moment.

  • Ralf Ebert

    Ralf Ebert October 18th, 2009 @ 01:04 PM

    From my understanding, the list shows the differences between the working tree and the staging index. If I create a new file, I'd call that a change between these two (they are different now, something has changed). I always clicked "Discard changes" expecting that the file will be deleted ("no, I don't want to commit this, I don't need it any more, it's just some leftover file"). Maybe it could be made clear by calling the menu item "Delete file" instead of "Discard changes" but this would make the multi-selection case complicated and clutter up the UI. Why not just delete file after a short confirmation?

  • Johannes Gilger

    Johannes Gilger September 10th, 2010 @ 10:01 PM

    • Milestone cleared.
    • Milestone order changed from “0” to “0”

    Fixed on my bugfixes branch. For now, I simply removed the "Discard changes" button for new files. One might think about a "Delete file" button for new files at a later point in time.

  • Johannes Gilger

    Johannes Gilger September 10th, 2010 @ 10:03 PM

    • Milestone set to 0.8
    • Milestone order changed from “1” to “0”
  • shashi mate

    shashi mate January 17th, 2019 @ 09:31 AM

    Hello Guys if you all are looking for studying abroad for MBBS or other medical course in countries like China, Kazakhstan, Russia, Armenia, Philippines, Bangladesh, Ukraine and many more at low cost, then below are list of colleges for you all.


  • GEOspatial

    GEOspatial December 5th, 2019 @ 08:53 PM

    • Tag set to espn activate, espn activate on roku, espn activate roku, espn activation, espn activation roku, espnactivation on roku

    Now a days Everyone is addicted to insternet and want to see everything On insternet,just watch your Favorite Tv channelon Roku streaming after espn Activation
    on roku.call us on 833-338-2444 or connect through chat support or visit us for more Info:

    Espn Activation



    Espn Activate

    Roku Activation


  • shashi mate

    shashi mate March 3rd, 2020 @ 09:41 AM

    Julio Licinio is SUNY Distinguished Professor in the Departments of Psychiatry, Pharmacology, Medicine and Neuroscience & Physiology at State University of New York Upstate Medical University in Syracuse, New York.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

GitX is the nice-looking gitk clone for OS X