When coding in Kotlin, do you guys use Git CMD or ...
# announcements
t
When coding in Kotlin, do you guys use Git CMD or just use the automatically integrated version-control system in IntelliJ (if you know what I'm talking about)?
s
I prefer using the command line
git
t
@Sumeet Parmar See this is where I don't understand many developers - isn't just overcomplicating everything? VCS should be easy-to-use... I don't know - I don't understand why developers make life hard for them; but if you prefer using CMD that's just your personal preference.
s
honestly, cmd line gives me more control. UIs have best intention but their icon/text/button may not map correctly to my intuition and as vcs needs to be precise so donโ€™t pollute the log or create some other mess, I prefer cmd line. I also use
vim
key mappings in all IDEs ๐Ÿ™‚
b
Knowing cmd line will help you better understand what's happening when integrated vcs stops working for whatever reason. I don't understand why people KEEP using cmd line over integrated vcs too, however I do believe it's very beneficial to spend some time with cmd line initially to understand it.
๐Ÿ‘ 2
t
@Big Chungus @Sumeet Parmar interesting perspective ๐Ÿ‘๐Ÿป
v
Actually IntelliJ has one of the best Git GUI clients integrated. But still, the only really usable and good Git UI stays the command line. You can do things much easier, faster and more correct than in any GUI, except for the very simplest cases. IJ can not even display properly which tag you have checked out or show the commit notes in the Git log or commit details. For both there are open feature requests and concrete suggestions since years.
n
I find it's really exhausting to relearn what "means" what when you try to use a git IDE
t
@Nir what do you mean by this?
n
like, when you "shelve", what exactly happens; okay, I have to go into some settings and check this box, uncheck that. Same with updateproject.
Like, if you know git well, you know exactly what git command you want to execute
the last time I tried, by default for example Intellij's shelve didn't even use stash, but it's own shelving mechanism
and anytime you are doing anything even slightly more advanced, as Bjorn mentioned, you'll probably need to go back to command line anyhow
The only git GUI (if you can call it that) which stuck for me so far, for everything, was magit, which is the emacs git plugin. But magit is very smart in that it transparently shows you exactly what you're running, so you get to "reuse" all your git knowledge with zero extra effort. All you actually need to do is learn keybindings.
t
@Nir I tried using Git CMD (not a good experience for me personally) but I always come back to IntelliJ. But yes, if you are doing more advanced things, I can see where CMD is useful; it has its place.
@Nir yes but isn't it harder-to-use when it's not integrated into the IDE?
n
well, the command line isn't either
you mean, wrt magit, or wrt to command line?
t
@Nir im talking about CMD - do you just have cmd open in another window and you just switch to it when you want to commit or something?
n
I have tons of terminal sessions open all the time, anyway
๐Ÿ™‚ 1
I think "life in the IDE" is only really possible if you're on a pretty large team, and there are other people that have handled all these other things for you, git workflow, all the things that I do in the command line, etc and those people have basically tried to optimize very hard so that the software developers don't have to do anything but develop in their IDE's
v
And you can also simply open terminal Windows in an IJ tool window
n
I think this is a sound strategy, don't get me wrong, but for many people, either because of being on smaller teams, less streamlined workflow, wearing more hats, etc, this isn't possible
๐Ÿ‘ 1
i usually use terminal emulators that support various tab/split options, and haven't been that enamored with the options for navigating between tools in IJ, but I admit I haven't tried very hard
I really wish that someone would try a git plugin for IJ based on similar principles to magit, would be awesome ๐Ÿ™‚
*try to make
t
@Nir so when you do vcs it's not just pushing, pulling, commits, and branching? there are some other operations that IntelliJ doesn't support?
n
I suspect that Intellij supports the things I need, it's just such a pain each time to verify that it's doing it in the way I want
is it doing --autostash? How do I do rebase --soft HEAD~3?
โ“ 1
t
@Nir my reaction to what you just said is โ“๐Ÿคฃ
n
Maybe I'm wrong and it's all amazing, but the discoverability is really bad, and it's been a really big turn off from investing time learning, that they try to use generic VCS terminology so their plugin works "seamlessly" with more VCS, instead of the proper git terms
Well, there you go ๐Ÿ™‚
Basically, without trying to sound snotty, but their VCS plugins seem to have a very low priority on people who already know git pretty well.
if you don't know git and your IDE was setup centrally to reflect the correct project ways of updating, pushing, etc, then it's perfect
t
@Nir to be honest I don't even use git - I use SVN with a local repo... anyways still interesting to see your opinions on this matter
n
If you know git and you know the exact command you need right now, because you made a minor mistake before, then you need to try to sift through and translate, and IJ makes this unnecessarily painful IMHO
well, I've never used anything but git, so we're at an impasse ๐Ÿ™‚. I can see JB's reasoning for some of why it is, I'm sure not all their clients use git.
v
As I said, for the simplest things like push, pull, checkout, commit it is a great GUI client. But as soon as you need to do something more involved, you need the command line anyway. There are many things IJ cannot do. So why bother with using two tools, when you can simply always use the command line. :-)
๐Ÿ‘ 2
Even when I'm forced to use SVN as backend, I'm using Git as client tool. :-D
j
I use the terminal in IJ to invoke Git CLI...
l
I use the terminal as I am constantly switching between different IDEโ€™s and setups. This is the only common โ€œwayโ€ to do it and saves me the hassle of remapping my brain on switching.
c
I've used CLI over UI for a long time (only using IDEA for conflicts), but sometimes last year I discovered how to do
rebase
in IDEA, and that's one part of git that is much, much easier to use with a UI. Since then I pretty much use the UI for everything, until there's something the UI can't do (which is rare). The only reason UI is faster than CLI is because JetBrains really likes keyboard shortcuts. And after a while, you can do pretty much anything way faster than you ever could with aliases (which I do also heavily use ๐Ÿ˜…)
The only thing I do in the CLI at this point: โ€ข rename a remote โ€ข cancel a commit (git reset --soft)
d
There are some things which are more comfortable in CLI that IDEA, e.g: - interactive rebase with fixups (
git rebase -i --autosquash <commit>
) - deleting remote branch without deleting local one (
git push --delete origin <branch-name>
) For this operations I usually switch to CLI, where I have few bash aliases for those commands, which allows to perform them in 3-4 typings (thanks to zsh autocompletion from history)
c
i like Sublime Merge because it always shows what's going on with cmdline, just makes it easier and it's easy to use both without changing mental models
k
first of all how is this related to kotlin ? use #C09222272 for this type of questions and to the topic: IJ git is best, it can handle 95% of my usecases. If you wonder what happend there is console tab where you can see all commands IJ issued. Only thing I do from CMD is
git fetch -f ...
to sync noncheckout branch or when something goes really wrong and have to reflog. if you create quick list for most used actions, it is even better
n
a specific feature on this topic is that it seems like IJ still does not support line-wise staging, only hunk-wise staging