Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Git workflow #1605

Closed
wernight opened this issue Jun 29, 2016 · 7 comments
Closed

Improve Git workflow #1605

wernight opened this issue Jun 29, 2016 · 7 comments
Labels
kind/enhancement A feature request - must adhere to the feature request template.

Comments

@wernight
Copy link

I can hardly commit via the command line because my user/email and SSH keys are not set.

Using the web interface of Che I'm constantly committing without including all the files or changes.

Current:

  • Git > Add to Index... only marks for addition without adding changes
  • Git > Commit... no matter what I check there it seems to also no add new/changed files or it's weird and I've no idea what it'll actually commit.

Expected:

  • Git > Commit... shows a list of files to commit with a checkbox next to each. Should check by default all modified or deleted files. Pretty much like SmartGit or Git Extensions.
@ghost ghost added the kind/enhancement A feature request - must adhere to the feature request template. label Jun 29, 2016
@wernight
Copy link
Author

I'd suggest the commit UI to look like:

image

or

image

And a simple sync button doing basically:

$ git pull --rebase && git push

This would cover the basic uses and make it really simple. More advanced users (myself included) would prefer the CLI, but the UI is really critical for less technical people.

@wernight
Copy link
Author

Noting also that Codebox (open source) does have a UI pretty close to my suggestions here:

image

image

@wernight
Copy link
Author

wernight commented Apr 11, 2017

Current steps to perform a single commit:

  1. For each file you changed, click menu Git > Add to Index... (why ... on this menu item?! it shows no popup)
  2. Click menu Git > Status because of course you forgot to add some files (I don't even know how to add "deleted" fiels)
  3. Menu Git > Commit selected... (which seems to possibly in a weird world commit the currently opened file with some options)
  4. Check "Commit all files in the project" (yea because you added them to the index you still need this else it'll unstage them WTF?!)
  5. If you checked "Amend previous commit" cancel, retrieve the previous commit message and repeat.
  6. Click menu Git > Remote > Pull...
  7. Click Pull (if you even want to rebase, which many people do, you cannot)
  8. Click menu Git > Remove > Push...
  9. Click Push

Nearly all options are confusing and ... are inconsistent with the behavior.

People want to commit all their changes by default, and review them before doing so. The UI of other tools (suggested above) provides that. Most users are completely confused by the "staging" aspect of Git, so that should clearly be more a hidden part (like the GitHub Git tool for Windows does in its pretty good UI).

The UI should be good at doing common operations simply. CLI would be used by advanced users (even though it requires re-creating credentials). So this should be like:

  1. Git > Commit > Uncheck files you don't want to commit.
  2. Git > Sync (doing a git pull --rebase && git push)

Confusing "current" file(s?)

The other very confusing part is that most operations like Git > History work on the currently selected file which isn't a single thing. If you selected FOO file in the explorer it's set to that. If you then select the tab of file BAR, even though the file explorer still has FOO selected, the Git operations will act on file BAR. So it may be the active tab or the selected item in the file explorer. Some options like Git > Status aren't dependent on the "current" file.

As a result I don't even know what I'm committing.

It'd change the behavior so that:

  • Right clicks from file explorer > Git acts only on those file (as current)
  • Right click on an opened file tab content > Git acts only on those file (as current)
  • Ctrl + Shift + A may have a "Git history of current tab"
  • Menu Git should act on the entire repository

@wernight wernight changed the title Improve Git file staging Improve Git workflow Apr 12, 2017
@TylerJewell
Copy link

@slemeur - bump

@slemeur
Copy link
Contributor

slemeur commented Apr 18, 2017

I agree with the overall UX problems with the git plugin. We are oftenly discussing this issue but have not prioritized a real revamp of the plugin.

We are starting in the current sprint to improve the git commit window: #3614

@iamslite
Copy link

Having a consistent interface in which you know exactly what is going to be committed (rather than the pot luck you get at the moment) should be the highest priority, over any redesigned UX. Specifically, unless something is actually checked in the "Commit to repository" window changes should not be being made to the index. You have options to add updates, add any files you have selected and commit all, which allow you to quickly add things to the index, so these should be being respected. If none of these are checked then just commit the changes currently in the index.

@slemeur
Copy link
Contributor

slemeur commented May 19, 2017

Hi @wernight and @iamslite. As discussed we have published a specification for a better Git integration in the next version of Che.
Please give a look at the issue #5128 and share your feedbacks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

No branches or pull requests

4 participants