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

Add git stash command #142

Open
jreybert opened this issue Aug 7, 2017 · 5 comments
Open

Add git stash command #142

jreybert opened this issue Aug 7, 2017 · 5 comments
Labels
backlog This issue will be done later new feature

Comments

@jreybert
Copy link
Owner

jreybert commented Aug 7, 2017

Current state of thought. Thanks to comment on:

  • default mappings
  • behaviors
  • missing commands

In vimagit buffer, stage your files/hunks/lines/part of lines as before. Once all your stuff you want to stash is in Stage section, use new mapping CS to enter in mode Stash. It is like the Commit mode, a new section "Stash message" appears on top on vimagit buffer. Enter a stash message (if not, it is like a git stash command without command, the message will be like WIP on branch..). Retype CS, your stage section is now stashed.

The main corner case detected for now is to handle wisely untracked files.

@fpnick
Copy link

fpnick commented Aug 8, 2017

Personally, whenever I use git stash, I want to stash every file that's changed. I.e. a shortcut for "stash everything" would be nice.

@jreybert
Copy link
Owner Author

jreybert commented Aug 8, 2017

I have the same request for commit. The real challenge is to find a mapping for that, even two mappings:

  • stash everything modified
  • stash everything modified + untracked

@fpnick
Copy link

fpnick commented Aug 8, 2017

How about mimicking Vim's convention about doing things to a whole line, i.e. repeating the operation key (I'm thinking about 'dd' and 'cc' here).
In this case that would mean

  • CAA to commit everything (from commit -a. The unfortunate thing here is that CA does something different
  • CSS to stash everything. CSSU could be used to also stash untracked files.

@jreybert
Copy link
Owner Author

jreybert commented Aug 8, 2017

I tend to avoid mapping overlap. If I set CSS and CSSU, the common command would IMO be CSS. But the command won't be immediate, as vim will wait for a possible U for CSSU.

@fpnick
Copy link

fpnick commented Aug 8, 2017

True. CSU would avoid that.

@jreybert jreybert added the backlog This issue will be done later label Oct 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog This issue will be done later new feature
Projects
None yet
Development

No branches or pull requests

2 participants