#18 ✓resolved

Change Staged UI for commits

Reported by kwerle | October 22nd, 2008 @ 10:18 PM

You are presenting a list with a binary selection (staged or unstaged).

I recommend a simple list with checkboxes - much more intuitive.

Files for this commit (staged) File01 [ ] File02 [x] File03 [x] ...

Comments and changes to this ticket

  • kwerle

    kwerle October 22nd, 2008 @ 10:20 PM

    Sigh. Nice formatting, preview, and edit abilities.. Of course I meant

    • File01 [ ]
    • File02 [x]
    • File03 [x]
    • ...
  • Pieter de Bie

    Pieter de Bie October 22nd, 2008 @ 11:25 PM

    The staged/unstaged is not a binary decision. A file can have both staged and unstaged files. This is very important in Git when you for example want to commit only a few changes in a file.

    See for example this movie on staging hunks that will be a future version of GitX

  • kwerle

    kwerle October 23rd, 2008 @ 12:23 AM

    OK, I found that movie confusing, too. Perhaps a trinary switch would work:

    • File01 [ ]
    • File02 [-]
    • File03 [x]

    Where clicking on the checkbox would change the binary state to/from [x]/[ ]. Clicking on the [staged][unstaged] indicators on the file itself would change the [-].

    What was happening in that movie when you clicked on stages/unstaged? Why didn't it just change the stagedness of that block?

  • Pieter de Bie

    Pieter de Bie October 23rd, 2008 @ 12:01 PM

    The problem is that you can have conflicting staged / unstaged information. Imagine the following:

    You change a line in a file, and add that as staged. Later on, you decide the line should be different, and change it. At that point, you have different version of the same line in both the staged and unstaged part. How are you going to show that in a single view?

    You could create a merge diff and show that, but I don't think that'll be more intuitive than the GUI that we have now. Also, by clicking on a file on the right, you can see all changes in that file that are going to be committed (which is very useful). If you merge the two states in one list, you lose that option.

    Also, if you mix the two (staged / unstaged), you cannot immediately see which files are going to committed: You'll have to scan the list for all files with a check mark to see if it will be included in the commit.

    I'm not saying that the GUI that we have now is the only way to go. However, I don't know any better way to do it.

  • kwerle

    kwerle October 23rd, 2008 @ 07:51 PM

    OK, I've read up on add and what it means, exactly. The ability to stage seems as powerful as it is unlikely.

    99.9% of the time that I click commit - maybe more - I just want to do that: git commit -a

    This is git, after all. If I want to roll back, I can do it.

    I guess I'd be happier with 2 UIs: * Commit (which lets you view diffs, add new files, type a message, and does commit -a) * Stage/Commit (which does the tricky stuff, and which I will never use)

  • Pieter de Bie

    Pieter de Bie October 24th, 2008 @ 09:13 PM

    Rolling back won't help you if you still aren't able to do partial commits. This is a very handy feature which I use all the time.

    However, this is an OS X application, so a simpler GUI is perhaps wanted I'm not sure how others view this -- I was under the impression that everybody does partial commits.

    While I'm not against a simpler GUI, I don't like the idea of having another view button. That's just confusing and clutters up the interface. Having this as a preference is also a bit odd, as I don't know of any other OS X apps that have a preference on how complex a UI should be.

    I'd really like more input, also from other users, on this :)

  • Kevin Glowacz

    Kevin Glowacz October 24th, 2008 @ 11:53 PM

    I also do partial commits all the time. I'll use gitx to make sure I've staged what I wanted to stage especially after using git add -i.

  • Pieter de Bie

    Pieter de Bie November 16th, 2008 @ 03:18 PM

    How about just adding a single button "Stage all changes"?

  • Si

    Si November 18th, 2008 @ 05:41 PM

    Just found this software, and it looks promising!

    Stage all would be nice, but what I really miss personally is multi-select of files (including CMD-A for select all) plus right click staging / stage selected button (no selection could mean stage all).

  • Pieter de Bie

    Pieter de Bie November 18th, 2008 @ 06:55 PM

    Yes, that's what I'm working on currently.

    You already can right-click and select "stage contents". I'll expand that to include all selected files :)

  • Pieter de Bie

    Pieter de Bie November 19th, 2008 @ 12:03 AM

    I added multiple selection just now (6fcc12d69d7782b035738ba912c7beff46af625d (CommitView: Allow drag 'n drop of staged / unstaged files)). It's now also possible to drag files from the staged part to unstaged (and vice-versa)

    I'm going to close this ticket because it has diverged a bit from the original goal. Anyone is welcome to open a new ticket with more UI improvements for the commit view.

  • Pieter de Bie

    Pieter de Bie November 19th, 2008 @ 12:04 AM

    • State changed from “new” to “resolved”
  • tom smith

    tom smith September 29th, 2018 @ 02:40 PM

    its a great project. download tvtap apk to watch free movies and tv shows

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