13 ms·
Magit 3.0
- bm3719 5y agoMagit is definitely one of the best addons for Emacs. Nice to see Forge getting some attention. One less reason to ever leave Emacs is always welcome.
- ta988 5y agoMagit is really one of the best git interface there is. I'm often coming back to it.
- jhvkjhk 5y agoI heard lots of praise to Magit. Is there a way to use it like a standalone git client? Like tig, lazygit, etc.
- ashton314 5y agoYou could just alias this in your shell: alias magit='emacs -nw --eval "(magit-status)"'
- jhvkjhk 5y agoThanks, that’s exactly what I want.
- iib 5y agoI was reading the thread and replied to a very similar situation. The only addition was that if you want only a magit interface, it makes no sense to load the rest of your emacs config, so you could add a special magit initialization file, and just add -Q --load magit-init.el
- dmm 5y agoSure, just open the git repo in a magit. I do it almost every day.
- codemonkey-zeta 5y agoDid you mean "open the git repo in a magit buffer"? Because then I'd agree. To address GP comment, you can just install vanilla emacs, then install magit, and just use that as your "standalone" app.
- CJefferson 5y agoI would strongly recommend first doing some emacs tutorials -- you don't have to start using emacs as your editor, but (in my opinion) magit does assume you have some understanding of how emacs works.
- globular-toast 5y agoHonestly, you'd only get a fraction of the power of magit doing it that way. It's power is due to it being thoroughly integrated into the environment you use for editing all kinds of text every single day. Imagine being able to control git using the same commands your used to in whatever text editor you use.
- aidenn0 5y agoI haven't tried very hard yet, but magic has been fairly unintuitive for me. Perhaps it's just that I've been using git for so long. 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
- pmoriarty 5y agoDo you remember what you tried? 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.
- drunkpotato 5y agoCherry pick is faster and easier for me in the CLI. I’ve read Magit’s documentation on Cherry pick dozens of times and I still have no idea what it’s doing. I think I have successfully done it in magit once, but now I don’t bother and just do it on the command line. For everything else I absolutely love magit. The ability to stage and commit chunks in a visual fashion is an unbeatable killer feature!
- SirensOfTitan 5y agoI do cherry picks in magit by: 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)
- drunkpotato 5y agoThank you! That workflow makes sense. We’ll see if I remember that next time I Cherry-pick.
- warp 5y agoMy experience is the same. Probably because I'm so used to git on the command-line already magit doesn't seem much benefit. 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.
- the_duke 5y agoEmacs is too laggy for me as my main editor. But Magit is so good that I start emacs up just to use it as my Git interface if I can't get by just with the CLI. Sadly there is no Vim plugin that is competitive. There is vimagit [1], but it's not on par. [1] https://github.com/jreybert/vimagit https://github.com/jreybert/vimagit
- unhammer 5y agoTried native-comp? https://news.ycombinator.com/item?id=24117853 https://news.ycombinator.com/item?id=24117853
- dhess 5y agoI have, on macOS, and somehow, it has much much worse lag than Mitsuharu Yamamoto's Emacs "Mac port," [1] which is still based on Emacs 27.2. The native comp version was so slow that I gave up and switched back to Mitsuharu's port, which is snappy enough for my needs even without the native compilation bits. From what I gather, mainline Emacs was adversely impacted by changes in Mojave. [2][3] The end result, for me, is that any gains in the native compilation are swamped by the macOS issues. I'm hoping that Mistuharu rebases his work on the native-comp Emacs soon, so that I can get the best of both. [1] https://bitbucket.org/mituharu/emacs-mac/src/master/ https://bitbucket.org/mituharu/emacs-mac/src/master/ [2] https://www.reddit.com/r/emacs/comments/faz1fm/seeing_a_flashing_screen_every_once_in_a_while_on/ https://www.reddit.com/r/emacs/comments/faz1fm/seeing_a_flas... [3] https://emacs.stackexchange.com/questions/59966/is-it-possible-to-prevent-screen-flashing-on-combination-of-isearch-and-recen https://emacs.stackexchange.com/questions/59966/is-it-possib...
- AlexCoventry 5y agoEmacs 28 is much faster for me, on ubuntu, FWIW.
- michaelcampbell 5y agoWhere are you getting 28? https://mirrors.ocf.berkeley.edu/gnu/emacs/ https://mirrors.ocf.berkeley.edu/gnu/emacs/ only shows up to 27.
- cstml 5y agoFantastic.
- amackera 5y agoMagit hits the sweet spot between flexible and easy that makes it an actually useful git editor integration. You still need to know git to use it, though!
- poidos 5y agoCongratulations to Jonas and the whole team! Magit is a joy to use and has made me feel supremely comfortable with advanced git work.
- globular-toast 5y agoNot to detract from Jonas's efforts in the slightest, but the original author, Marius Vollmer, deserves a lot of credit for coming up with the UI for magit. There weren't any other emacs packages quite like it at the time.
- mekster 5y agoHow does the interface compare to SourceTree?
- dreamcompiler 5y agoMagit is designed for people who are already used to the git command line. Sourcetree is not. Sourcetree is mouse-oriented, and to me it has the same disadvantages as all git GUI clients: I'm never quite sure what it's doing behind the scenes, and it cannot quite do everything useful that command line git can do. Magit is keyboard-centric like emacs. Yes, so is the command line but Magit relies on individual keystrokes rather than typing in a line of commands and hitting <return>. The result is that once you get used to Magit you can fly through git operations and it's almost always quite clear what git operations Magit is doing. There are still a few exotic command line git operations Magit won't do but I almost never need them.
- tcoff91 5y agoMagit is like using the terminal client but easier. You have to press fewer keys to do things, and it makes the various operations discoverable through menus. It's really the best way to interact with git IMO. However, if you don't use Emacs already it's a little much to setup Emacs just to use Magit. SourceTree is terrible IMO. I've had to help so many coworkers (who don't want to learn proper terminal git) unfuck their local repos after SourceTree did god knows what to it. Other git GUIs like Fork or Git Tower never caused these same issues in my experience. If you are currently using SourceTree I would recommend trying this instead: https://git-fork.com/ https://git-fork.com/
- globular-toast 5y agoIt's in a different league. Hard to explain to a non-emacs user, though. Which is a tragedy because I'd love to explain, but some things just have to experienced.
- chewxy 5y agoI ran `magit-version` and I got Magit 20201225.4, which I assume is the 2020 Christmas edition of Magit. Did they suddenly switch to semver?
- 2pEXgD0fZ5cF 5y agoYou are probably using melpa instead of melpa stable (like most, I assume). In melpa, all packages use the yyyymmdd.x type of versioning. In melpa stable packages use semver. Have a look: https://melpa.org/#/magit https://melpa.org/#/magit https://stable.melpa.org/#/magit https://stable.melpa.org/#/magit
- NeutralForest 5y agoMagit is one of the best piece of software for Emacs! Good stuff =)
- zelphirkalt 5y agoLooking forward to using the new release. "git at the speed of thought" describes magit quite well. Actually sometimes magit nudged me into the direction of looking up some more special git commands, to learn about them and then making use of magit's interface to them, often simply pressing one button more. Magit has not made me forget how command line git works, because it often shows me right there, what the arguments are I am specifying by a few key presses actually are. If it made me forget how to use actual git, I would be thinking: "Meh, but I should know how to use git actually, for the times when I do not have magit around." Fortunately this is not the case at all with magit.
- Steltek 5y agoMagit has a great mix of direct manipulation of git primitives and good visualization. I think I've learned how git works faster through Magit than I would have from using the CLI. It's really hit a sweet spot for me.
- lambdaba 5y agoThis is what I'd want from any GUI, ability to "view source" and then use in scripting etc.
- TeMPOraL 5y agoI'm sure you know this, but for the benefit of other readers, pressing '$' in Magit status buffer (and likely bunch of others) pops up a buffer that lists actual commands issued to Git, so you can always check how Magit interaction maps to Git CLI commands.
- neves 5y agoNice. I think the same about the GUI gitExtensions. I'll give it a try
- willtim 5y ago> "git at the speed of thought" describes magit quite well. Not under Windows, unfortunately.
- Decabytes 5y agoMagit is incredible and Emacs is my main Editor. Reading the post a couple days ago on text selection and how hard it is to get right makes me even more in awe of what a text editor does
- johndoe42377 5y agoThis is a bloatware inside Emacs, while it should be a thin wrapper and a few modes. The whole point is to reuse Emacs APIs, not building up piles of crap with tens of dependencies. Enterprise software for Emacs lmao
- bgorman 5y agoWhen I switched to emacs, I thought org-mode and repl integration would be the killer features. I was wrong- Magit is best emacs feature by far. It’s great that parts of the magit experience have been separated into packages. Perhaps now mercurial, perforce etc can get clients similar to magit in quality.
- aryamaan 5y agoI never fail to see so many high things about Magit and I believe they are rightly placed. I am a non Emac user and wonder why no one tries to bring something similar client for non Emac population.
- MobileVet 5y agoIt really is fantastic... and for the non-Emacs folks like myself you can run it in Spacemacs w/ VIM bindings (aka evil mode).
- jidiculous 5y agothere's an effort to replicate Magit in VS Code: https://marketplace.visualstudio.com/items?itemName=kahole.magit https://marketplace.visualstudio.com/items?itemName=kahole.m...
- AlbinoDrought 5y agoThere's `tig`, but I'm not sure how well it compares to `magit`. It's still much faster than typing the commands manually. Here's a previous discussion: https://news.ycombinator.com/item?id=10090348 https://news.ycombinator.com/item?id=10090348
- trentontri 5y agowhen can we stop renaming 'master'? it's a pointless update.
- mumblemumble 5y agoI'm not sure you understood this change? This Magit update is not renaming branches or telling you what branch name to use. Quite the opposite. It's a switch from assuming everyone uses only one of the many conventions out there, to having out-of-the-box support for all the major ones.
- divs1210 5y agoMagit must be one of the best software tools ever written. I sorely missed it when I had to use IntelliJ for a few projects, so I wrote a TUI tool like Magit that can be used inside the console window of most IDEs like IntelliJ etc. Still haven't gotten around to releasing it properly, but it's easy to setup and works well enough to be a working MVP. https://github.com/hugit-project/hugit https://github.com/hugit-project/hugit
- iib 5y agoWould the need for a pure terminal magit be resolved by the fact that Emacs can run in the terminal? [1] seems to have a solution to obtain a fast starting subset of Emacs and start into magit-status directly. emacs -Q -nw --load magit-init.el --eval '(progn (magit-status) (delete-other-windows)' Would this work in IDE consoles? [1] https://www.wisdomandwonder.com/article/10787/emacsorg-mode-personal-magit-from-the-terminal https://www.wisdomandwonder.com/article/10787/emacsorg-mode-...
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]
- divs1210 5y agoThanks, it should! Will try it out!
- tephra 5y agoI usually always have Emacs up and even if I'm in vscode or intellij I use magit in Emacs for all got things.
- codychan 5y agoYou haven't touched its core code for two years, what happened? Gave it up?
- 5y ago
- globular-toast 5y agoI love git but every time I have to use the cli instead of magit I cry a little.
- omaranto 5y agoWhen do you have to use git rather than magit?
- globular-toast 5y agoMostly helping others fix their mistakes on their machine.
- omaranto 5y agoMakes sense. I'm lucky no one asks me git questions: the few friends I have that use git know it much better than I do; most of my friends and all of my family don't use git at all.
- nonbirithm 5y agoI wish Git would have some kind of command-server mode or libgit2 was supported with Magit to prevent needing to create new processes on Windows. Magit sometimes creates dozens of Git processes for a single operation, but because process creation is much slower on Windows than Linux, it makes Magit unusable for me on those systems. (Sadly, I don't always get a choice to just use Linux.) Simple things like magit-status take 10 seconds per refresh/stage/unstage instead of half a second elsewhere. It got to the point where using the git command line was much more bearable, but way more error-prone, and I miss Magit every time. https://magit.vc/manual/magit/Microsoft-Windows-Performance.html https://magit.vc/manual/magit/Microsoft-Windows-Performance.... https://github.com/magit/magit/issues/2959 https://github.com/magit/magit/issues/2959
- jackewiehose 5y agoI also can't use magit because of this. I thought the poor performance came mostly from my big repository with lots of binary files but now I 'git-filter-repo'ed the .git-directory from 2-3 GB (packed) down to 150 MB and magit is still no fun at all (although better than before).
- dan-robertson 5y agoMagit already has some basic support for libgit. Browsing the issues I get the impression that if someone made a reasonable pull request to support libgit2 for a few dozen methods (should be easy to prioritise based on profiling) then it would be accepted. I don’t think the maintainer wants to review pull requests for one function at a time. I think one issue is perhaps that windows performance isn’t a particularly high priority and changes may not be accepted if they degrade Linux performance. Aside: isn’t process creation more reasonable with WSL? Or can you not easily use it?
- jackewiehose 5y ago> isn’t process creation more reasonable with WSL? In my experience WSL is overall much slower than cygwin.
- dang 5y agoSome past related threads: Magit – A Git Porcelain inside Emacs - https://news.ycombinator.com/item?id=24431216 https://news.ycombinator.com/item?id=24431216 - Sept 2020 (83 comments) A walk through the Magit interface - https://news.ycombinator.com/item?id=21729597 https://news.ycombinator.com/item?id=21729597 - Dec 2019 (81 comments) Magit 2.13 released - https://news.ycombinator.com/item?id=17220630 https://news.ycombinator.com/item?id=17220630 - June 2018 (49 comments) Show HN: Magit, the magical Git interface - https://news.ycombinator.com/item?id=15358723 https://news.ycombinator.com/item?id=15358723 - Sept 2017 (5 comments) Magit Kickstarter fully funded - https://news.ycombinator.com/item?id=15312288 https://news.ycombinator.com/item?id=15312288 - Sept 2017 (71 comments) Emacs and Magit - https://news.ycombinator.com/item?id=14819256 https://news.ycombinator.com/item?id=14819256 - July 2017 (174 comments) Magit: a Git porcelain inside emacs - https://news.ycombinator.com/item?id=10643977 https://news.ycombinator.com/item?id=10643977 - Nov 2015 (14 comments) What's new in Magit 2.x - https://news.ycombinator.com/item?id=9936095 https://news.ycombinator.com/item?id=9936095 - July 2015 (23 comments) Using Emacs and Git with Magit 2.1 - https://news.ycombinator.com/item?id=9873237 https://news.ycombinator.com/item?id=9873237 - July 2015 (29 comments) Meet Magit - Git Mode for Emacs - https://news.ycombinator.com/item?id=2543265 https://news.ycombinator.com/item?id=2543265 - May 2011 (4 comments)
- ducttapelogic 5y agoJust a trivia info (I guess that's how it's called?) - especially interesting for mathematics lovers: the creator of Magit is Jonas Bernoulli, from Basel. Probably a descendant of the famous Bernoullis https://en.wikipedia.org/wiki/Bernoulli_family https://en.wikipedia.org/wiki/Bernoulli_family p.s. Somebody correct me if I'm wrong.
- ajross 5y agoTried it once. It seemed cute. That lasted precisely up to the point where I did a "git rebase -i" and landed in some crazy custom mode where I was supposed to use... I dunno, secret keybindings or something instead of just reordering the patches like I've done for years and years. It went right in the trash and I haven't looked back. Do. Not. Break. Workflows. Ever. If a user knows they're supposed to open a file in a specific format in their editor, and you inject your pixie dust into the guts of their editor thinking you know better what they want to do than they do, then all you've done is prove to the user that you cannot be trusted to support their work. Seriously: I don't use magit and don't want to learn its new tooling because I don't trust it not to break itself.