There have been several times that I tried something with magit, and messed things up enough that I just dropped into a shell and did everything with the git command line
There have been several times that I tried something with magit, and messed things up enough that I just dropped into a shell and did everything with the git command line
It looks a bit like a menu-based GUI, so you'd expect to navigate around and use a standard set of keys, but most of it is actually powered by special key combinations.
Now, in some circumstances, that works fine, but honestly the interface could be simplified a bit and probably made faster to use. And less prone to the "oh shit, I thought I was typing something but now I actually hit 3 different Magit key combinations and have no clue what just happened".
Personally, I'm hoping someone takes the standard VC thing in Emacs and adds some of the Magit features to that. But meanwhile, I'm using Magit. :)
I just open up a log view to the branch i'm cherry-picking from, move the cursor to the commit I want to pick, then if I don't remember what the key is I just press ? and it shows me all the commands, then I press A for cherry-picking, and it immediately populates it with the commit that my cursor is on in the log view. Easy-peasy.
Yours has been literally the first negative comment out of hundreds of comments I've read about magit. It'd be interesting to learn what didn't work for you and why.
For everything else I absolutely love magit. The ability to stage and commit chunks in a visual fashion is an unbeatable killer feature!
1. Check out target branch
2. l o (log other) source branch
3. Highlight commits from list you want to cherry pick.
4. A A to apply the pick (I typically throw a -x flag into there too)
I just gave it a try:
magit-blame seems hard to read, I guess it's a limitation of emacs, or can it be configured to show the author name on the left of the line like CLI git blame?
I tried to find the equivalent of "git add --patch", but did not find it in the info manual.
There are different styles available. While blaming a file, press B to open the popup, then c to cycle through them.
> I tried to find the equivalent of "git add --patch", but did not find it in the info manual.
That's just the entire staging workflow. You see a list of changed files, which you can stage per file. Or you can expand a file to its changed chunks using TAB, then stage chunk by chunk. Or you can select some lines in the chunk and stage only those.
This is (in my opinion) terrible advice, as you need to be a fairly competent emacs users to use magit, else you will keep hitting weird situations you can unable to escape (as you don't know the emacs thing to do).
The submenus are also a bit overwhelming. I just wanted to stash my working tree, not be given dozens of options for how to stash! Emacs already has a way to signal that you want to give an option to a command, so this interface feels very un-emacsy. "M-x magit-stash" should just do the common thing imo. C-u M-- prefix if I want something fancy.
Another time, I fat-fingered a branching operation, and I spent a good five minutes trying to figure out how to fix it within magit, and then gave up and solved it in 30s from the cli
EDIT: okay dozens overall, < dozen simultaneous
What kind of race car stuff does git CLI offer that makes you have to go through weird contortions in magit :)?
So it's really 100% on me for not being an emacs native rather than any shortcoming of magit per se, and as I said at some point I'll probably invest the time, but I _already_ have muscle memory for working in my terminal.
Just practice, practice, practice. I can attest that the benefits are worth your while (if you use git daily, at least).
Note that you can run raw git commands by pressing : in any magit buffer. It opens a commandline prepopulated with `git `, so you can type whatever you want afterwards. The output will appear in the relevant `magit-process` buffer.
(The choice of : is analogous to M-: which will execute an Emacs Lisp expression)