gitx icon indicating copy to clipboard operation
gitx copied to clipboard

Gitx dev stashes

Open muhqu opened this issue 12 years ago • 29 comments

Support for stashes (see #14 )

Major Tasks:

  • [x] list stashes in sidebar (with libgit2)
  • [x] pop stash (context menu)
  • [x] apply stash (context menu)
  • [x] drop stash (context menu)
  • [x] view diff (context menu, open in new window)
  • [x] stash save via commit dialog (Hold down ⌥-key in commit dialog to reveal 'Stash Changes' button and 'Keep Index' checkbox.)
  • [x] app menu items:
    • "Stash Save ⌘Y"
    • "Stash Save - Keep Index ⌥⌘Y" (alternate)
    • "Stash Pop ⇧⌘Y"
  • [x] display an error message when "stash save/pop/apply" result in error

Optional Todos:

  • [ ] implement "stash save/pop/apply" via objective-git or libgit2

gitx

gitx branch_ gitx-dev-stashes

muhqu avatar Aug 07 '13 19:08 muhqu

it looks great !

schmurfy avatar Aug 08 '13 07:08 schmurfy

I can test it out see if it works fine for me if you want, I will need a binary thought. on the todo I think the error message is a really important thing to have, based on my own workflow half of the time applying a stash result in a conflict, most of the time a minor one but still I prefer to know it ^^

For me the main use of the stashes list in GitX would be to see what I have in store more than acting on it via GitX, I still do most of my actions in a console.

schmurfy avatar Aug 14 '13 07:08 schmurfy

:+1:

kieran avatar Aug 15 '13 15:08 kieran

Well I don't know ObjC and I haven't tested this patch, but I want this feature, so :+1:

emptyflask avatar Aug 21 '13 20:08 emptyflask

@schmurfy and anyone else who wants to test this PR without having to build it them self here's a link to a binary build by myself: http://muhqu.de/builds/[email protected]

muhqu avatar Aug 21 '13 20:08 muhqu

Btw, I'm not sure what might be the best keyboard shortcuts for the menu items... I choose ⌘Y mostly because I feel "stash" in git it a bit like "yank" in vi, if you know what I mean. But If you guys have other ideas just let me know!

muhqu avatar Aug 21 '13 20:08 muhqu

@muhqu thanks for that. It seems to work well...

emptyflask avatar Aug 21 '13 21:08 emptyflask

Seems good here as well! :100:

kieran avatar Aug 21 '13 21:08 kieran

since we can rebind any shortcut anyway thanks to mac os x I don't think the default one is that important.

schmurfy avatar Aug 22 '13 07:08 schmurfy

it seems to work well for me too (I am on 10.8.4)

schmurfy avatar Aug 22 '13 07:08 schmurfy

@muhqu I mostly deprecated the error sheet because it was really buggy after the ARC conversion; that should be fixed now. I think I never got around to un-deprecating it because it's not a particularly good UX design, but it's fine to use for now.

rowanj avatar Aug 23 '13 01:08 rowanj

Is there an ETA for this pull request to get merged? Stash support directly in GitX would greatly improve my workflow.

mengelbrecht avatar Aug 29 '13 19:08 mengelbrecht

same, and as far as I can tell the binary posted works fine.

schmurfy avatar Aug 30 '13 07:08 schmurfy

bump

Would love to have this in the main build ;-)

kieran avatar Sep 19 '13 19:09 kieran

:+1: me too.. ;-) version bump! ...version bump! ...version bump! ;-P

muhqu avatar Sep 19 '13 19:09 muhqu

Btw, eventhough I have this in my build, I don't get much used to it. I'm still using DTerm for stash / stash pop stuff...

muhqu avatar Sep 19 '13 20:09 muhqu

I currently keep a Laullon build around for stashing & popping. I find it incredibly handy to browse the stashed diffs since I'm constantly switching contexts for hotfixes.

Thanks for this PR! Looking forward to only having one version :-)

kieran avatar Sep 19 '13 20:09 kieran

n.b. the merged branch (issues/239) is currently missing a few XIB changes that conflicted

rowanj avatar Sep 20 '13 14:09 rowanj

this will be handy. :clap:

aoxborrow avatar Oct 09 '13 18:10 aoxborrow

any news about this issue?

pvinis avatar Nov 11 '14 11:11 pvinis

@pvinis looks like I need to rebase this feature branch before @rowanj eventually might feel the urge to merge it.

While I implemented this feature, I never really got used to it when I was running my own builds of GitX-dev. When it comes to stashing and switching branches etc, I use DTerm (open-source context aware hud-style terminal) to invoke git commands.

muhqu avatar Nov 11 '14 13:11 muhqu

i often use stash and an easy way to make named stashed etc would be nice. i will check DTerm though. thanks

pvinis avatar Nov 11 '14 13:11 pvinis

it would be really nice to have this, it would be sad to let the work you did go to waste :)

schmurfy avatar Nov 12 '14 09:11 schmurfy

tried DTerm. looks like a very useful little app. the only problem is that i also use git bisect, and bisect has to be ran at the root of the repo.. now im sad again :p

pvinis avatar Nov 12 '14 09:11 pvinis

@pvinis without knowing much about git bisect, you might get what you want by adding an alias that just cds into the working copy's root directory and issues git bisect … there.

git config alias.biisect '!f(){(cd "$(git rev-parse --show-toplevel)"; git bisect "$@")};f'

…then you can use git biisect … from everywhere inside your working copy.

muhqu avatar Nov 12 '14 10:11 muhqu

Hey, anyone has updates about this PR ?

nguyenkims avatar Nov 04 '15 15:11 nguyenkims

...no. I haven't done any gitx development in a long time. Wondering if it even compiles with latest XCode... :-/

muhqu avatar Nov 04 '15 18:11 muhqu

i use it daily, but i have gitup for stashes.

On Τετ, Νοε 4, 2015 at 19:59, rowanj/gitx [email protected] wrote: ...no. I haven't done any gitx development in a long time. Wondering if it even compiles with latest XCode... :-/

— Reply to this email directly or view it on GitHub [https://github.com/rowanj/gitx/pull/239#issuecomment-153830795] .[https://github.com/notifications/beacon/AAGHiUyFl2FK13FiwaML4MLwLReTsc0Lks5pCk0NgaJpZM4A4iQX.gif]

pvinis avatar Nov 04 '15 19:11 pvinis

FYI the stash support of this PR has actually been integrated into this very active fork: https://github.com/gitx/gitx 🎉

muhqu avatar Feb 01 '18 14:02 muhqu