Thanks for this. I've always felt the same way but haven't been able to put my finger on why. As more things get integrated into my editor (I use VSCode) I feel like I should use the shiny features, but for source control I think I'm going to only use the commandline forever. (Edit: though plugins such as GitLens that give you source control info inline are fantastic.)
Along with some nice features I've added, such as my 'git af' (add + fzf) shortcut[1][2], the commandline is very usable (don't have to 'git add' and type filenames manually).
[1] https://github.com/kbd/setup/blob/65b3d0abcb34540b43880792e8...
[2] https://github.com/kbd/setup/blob/65b3d0abcb34540b43880792e8...
I will refuse to use any Git tools or UIs, but the standard CLI, until the end of my career.
Besides that, my IDE/Editor is neither a build tool manager nor should it run my app from within an integrated console having specific settings. The projects people are going to inherit from me will always be editor-agnostic, the environment they run in will never depend on a certain setup that can‘t be documented clearly and they will always run within an isolated context, i.e. the project root.
Git is complex enough that I don't trust more complex operations (basically anything beyond push, pull, add, and checkout) to be handled by a GUI, but a GUI can make for a great code review tool.
So I started wondering why Apple would even want to add such a useless feature into an otherwise really powerful and useful editor, even back then in Xcode 3. And I imagined this scenario where they were brainstorming and someone higher up in the Xcode team was like "ok guys, I got word from above that 'source code' is becoming a big thing now, and we need to add it somewhere" and someone was like "how about the project navigation list?" and someone else maybe piped up "but it doesn't really fit hierarchically in the metaphor" and someone else was like "dude it's 4:30pm some of us have families to get back to can we just forget about the metaphorical inconsistencies?" and they just added it as an expandable item.
I use Xcode and VS Code ever day, and I absolutely never use the Git functionality in either of them. I tried both for a few weeks each, but absolutely nothing compares to Magit[4]. Not even command line. For git, Magit is the same secret weapon that pg claimed Lisp was for programming.
[2] https://i.imgur.com/DYJN12N.png
[4] https://magit.vc
Another option is git add -p, which asks you about each change so you can review them once more and maybe leave some (parts of) them for future commits.
git gui
You can right-click on some line in the file and select "Stage Hunk for commit", etc. instead of `git add -p`. It can be also helpful for browsing history, esp. "blame digging".I don't remember what happened for me to start doing this, but it saves so many headaches that I don't care.
All the graphic Git clients cause me panic. I have Sublime-Merge has a read only thing, because it shows diffs in a nice format. But I am still not ready to commit something from it.
git add -i git commit -a
a lot - it's most often the exact thing I want to do, with the exception of adding new files.This many times. I'll open SourceTree to view a large set of diffs or changes, but still drop back to the CLI to push/pull/rebase/commit/stash/etc... I know what git will do in those cases, and am a little wary of git UIs.
OTOH, I despise heavily modified bash/zsh/whatever profiles which makes the environment non-portable. Extreme eye-candy in the console makes stuff harder for devs/admins who logs in to thousands of servers.
I purchased Sublime when it was the least bad editor out there, but finally realized that I was suffering from the sunk cost fallacy. I still consider it the worst software purchase I've ever made, and it's also why I'm reluctant to pay a single buck for software nowadays.
I only wish Sublime Text were able to (out of the box) mount / SSH into any server like emacs does (using TRAMP). I'm finding myself using VIM lately mostly because it's a step up from nano which uses tabs, not sure how to tell it how to space things, nano is perfect for Go I suppose. I have to figure out how to configure VIM for spacing things properly though, but I mostly install Sublime Text on VM's I write code in.
Then came 2014 and it started to look like the Sublime developer had taken a hiatus. The timing was really bad as ST2 still had showstopper issues (for me) that were fixed in ST3, which in turn had another bunch of unfixed bugs. Meanwhile Atom was released and it got its bug fixes and new features regularly, even though it was and still is really slow. I had to choose between two borderline unusable and one functioning but heavy editor. With a heavy heart I had to abandon an editor that I had valued at 70 dollars, which at that time was also the largest sum I had ever paid for software.
As soon as VS Code started to gain traction, I made the switch. For some reason it felt and still feels much snappier, even though both Atom and it are built on Electron and have approximately the same features.
When not writing code or LaTeX documents, I'm editor and OS agnostic. Often you just have to make do with whatever an esoteric system offers.
If only more were sanely tech agnostic. I feel the same way, I try to use JetBrains tools if possible, if low on memory, then Sublime, VIM or Emacs (Somewhat Nano / ne) work for me.
In any case, what works for you might not work for other people. We're also talking about four–five years old issues here.
These days pretty much every serious editor has multiple cursors, including Visual Studio Code.
people look at me like I'm an old crazy dude because I don't use a git UI or eclipse, or intellij, or from sublime. Git already has plenty of quirks, adding another layer of unknown on top of it is a no-go
Staging/diffing is especially convenient with VSCode. `git add -p` used to be my most-used command, but VSCode just makes the process easier.
I use multiple IDEs/editors, and they all handle git differently. It doesn't make sense to learn yet another N sets of quirks.
Consistent? Ha! Change branch: git checkout my-branch. Reset file to committed version: git checkout -- my-file. Git is many things, but consistent it is not.
That said, I still use CLI precisely because I don't trust other software to make sensible abstractions on top of it, given that foundation is so inconsistent. Besides, those CI scripts only know git cli...
> well known set of problems
that's precisely the well know set of problems. You learn them once, apply on every console. If each UI decides to overcome them differently, you end up with N+1 different behaviors.
I'd rather have only one set if inconsistent commands, than 3.
edit:formatting
All I did was press Commit which apparently decided to stage and commit everything under the root folder.
It didn't do this in other projects so who knows what was different.
This is how credential files must get committed to github every day.
If VS Code is going to be smart about so many other things, then there should be some sort of warning for major code affecting changes.
You are about to push 5000 files to master repo inluding some that appear to be widely used libraries, are you sure that is what you want ?
If you don't have anything staged and hit Commit, it will show a prompt asking if you want to commit everything that's been changed. It sounds like you hit 'yes' on this prompt by mistake.
I still use the CLI to push/pull/branch/merge, etc just to have total control, but staging files, viewing diffs and making commits are a lot more annoying in the CLI.
What's described in that github issue happened to me as well the first time I used git via Visual Studio. I normally don't do that, but something told me to make a zip of everything before using git in VS. So that saved me big time.
Why in the world are the deletions not pointed to the Recycle Bin??? That's what it's there for.
I mean, if you point software you don’t understand at work that’s not backed up you shouldn’t be shocked if it does something you don’t like
VSCode has this. Hold down Command on Macs (probably Ctrl on Windows/Linux) and click. You can also select "next similar word" with command-D so you can quickly change all instances of a word to another word.
I also exclusively use the command line for source control (of which I use at least four, but mostly git and hg). I just do not trust IDEs to do the right thing, although JetBrains does get close (but my colleague devs hate the properly pruned .idea in the repos).
In my life:
- I'm committed to emacs for org-mode and LaTeX editing and daily use.
- I paid for sublime so i will use it -- and multiple cursors everywhere is a boon for quick and dirty data munging.
- I write serious python code in pycharm.
- I write serious c# in full blown Visual Studio