3 ms·
If you status, commit, diff often then you don't want to leave your editor, because every little things (switching to a terminal just to do git stuff) adds up i
by dmortin 8y ago
If you status, commit, diff often then you don't want to leave your editor, because every little things (switching to a terminal just to do git stuff) adds up in the long run.
Version control functions should be available right in your editor (e.g. magit) and you can't really beat one character hotkeys for version control stuff. It doesn't get more convenient than that.
- yellowapple 8y agoSeconding the in-editor approach. Magit is wonderful (though I often do end up heading to the command-line for certain things out of habit).
- john2x 8y agoI think it's good to keep doing some things via command line, so as not to forget how Git works "under the hood". I also keep my Git alias commands to a minimum for a similar reason.
- dmortin 8y agoFor me flow is important, so that I don't get distracted when working. The best way to achieve this is having single key shortcuts. Knowing how GIT works uder the hood is less important than staying in the flow, at least for me as a developer. People responsible for repository maintenance may have other priorities.
- jolmg 8y ago> If you status, commit, diff often then you don't want to leave your editor, because every little things (switching to a terminal just to do git stuff) adds up in the long run. That sounds like limiting the functionality of the whole computer to what the text editor can do. That doesn't make sense. Next, you'll want to browse the web from the editor because you don't want to leave it (just because emacs does it doesn't mean it isn't absurd). Anyway, I think it's better to configure the system so using multiple programs is as quick and effortless as possible. For your example, I use i3, a tiling window manager, and have the screen split with a terminal window on the left and my editor on the right. If I wanted to check `git status`, I just type `<super+h>git s<enter>`. To go back to the editor, `<super+l>`. There's really not much difference with a single character shortcut.
- dmortin 8y ago> That sounds like limiting the functionality of the whole computer to what the text editor can do. Not really. It's about putting the most frequent features into your editor, so they can be accessed effortlessly. If you have to do something which is less frequent and the editor does not support it then you still have the terminal. > If I wanted to check `git status`, I just type `<super+h>git s<enter>`. To go back to the editor, `<super+l>`. There's really not much difference with a single character shortcut. It's efficient compared to switching to the terminal with alt-tab or something, though by single shortcut I meant that you can use it right in your editor buffer, so it's really just pressing one or two keys vs. `<super+h>git s<enter>`
- xorcist 8y ago> Next, you'll want to browse the web from the editor Well, you're clearly replying to an emacs user. He/she will not find that statement the least hyperbolic.
- dmortin 8y agoI do. I use a separate browser. There are people who want to do everything from their editors. There are people who want to do only editing in the editor. And there are middle ground people like me who want editor integration when it makes me more efficient (like invoking frequent VC commands right from the editor), but I do mail and browsing and stuff with external tools.
- stult 8y agoThat's a terrible analogy. I only use git with my IDEs and only use my IDEs with git (except one weird outside project at work where I have to use a partner company's TFS). So integration makes complete sense. Hell, that's true whether you use CLI or GUI. I use my browser for an infinite variety of different activities, only a tiny subset of which relate to my IDE.