Say you want to find a commit that occurred around June three years ago, and look at what the repo looked like after that commit -- without checking out any files. How do you currently do it?
For me, I just Right click -> TortoiseGit -> Show Log -> scroll -> Right-click -> Browse Repository.
How long does it take you? For me it takes < 10 seconds (I just timed myself).
Not against GUI or anything but just curious about doing it from CLI:
git log | grep 'June 2017' (and remember the first 5 characters of hash)
And then `got checkout <hash>`
git log | grep -- find the hash of the one I want. or git log > file and look at it in an editor. no need to change the tools just for this unusual action.
I understand that YMMV -- de gustibus non disputandum est -- but I have ever understood the appeal of GUI tools especially for something like git. I do use magit, but even then I do most manipulation with the command line interface
Probably just GitHub (the browser UI). If you want to do it offline or from the command line, I understand why you might hesitate want to check out files, but stashing in git is extremely easy.
Try doing a merge with IntelliJ's 3-way merge UI. It's flippin' fantastic compared to roaming through the files and removing sections between >>>> and <<<<.
Many people are visual. It's a lot easier to see changes, compare diffs, and generally follow the development branches through a GUI instead of through a command line.
I think the main advantage of GUIs in general is a contextual, curated explorability that is often lacking in CLI tools. The GUI is stateful, allows the user to click on things and prod it, and hopefully shows the most frequently used features for that context. This allows even complete newbies to be productive almost immediately.
For something like git, the slightly more visual representation is a benefit to many, too.
I'm not here to knock CLIs, there are a set of tradeoffs to be made, and CLIs win in many cases (flexibility, scriptability, being able to copy snippets you frequently use, etc). The above does tend to hold true, however.
Infamous, and a more accurate description might be that discussions about git are well-known for quickly descending into discussions about whether or not it's intuitive and whether or not that matters since you use it every day you'll soon get it and no longer care that much how intuitive it is anyway.
As someone else mentioned here, the graphical merge tool in IDEA is extremely powerful. Plus keyboard shortcuts to all the main Git actions. It's overall more efficient. However I always use Git IDEA + Git CLI side by side.
I'm really curious - why do people want a graphical git client? The command line exposes everything, and the model is simple and intuitive.
I work in a very large monorepo, so it's not like I'm working in a git tree that isn't complicated.
> the model is simple and intuitive
I nearly spat out my drink. Git is many things but those aren't the first two words that would leap into my head.
Git model is simple.
What is complex is the hundred features and commands it provides on top of that model.
5 replies →
The model is relatively simple, but the UI is a disaster.
Which is exactly why people want better clients than the official git cli client.
2 replies →
Say you want to find a commit that occurred around June three years ago, and look at what the repo looked like after that commit -- without checking out any files. How do you currently do it?
For me, I just Right click -> TortoiseGit -> Show Log -> scroll -> Right-click -> Browse Repository.
How long does it take you? For me it takes < 10 seconds (I just timed myself).
Not against GUI or anything but just curious about doing it from CLI: git log | grep 'June 2017' (and remember the first 5 characters of hash) And then `got checkout <hash>`
3 replies →
git log | grep -- find the hash of the one I want. or git log > file and look at it in an editor. no need to change the tools just for this unusual action.
I understand that YMMV -- de gustibus non disputandum est -- but I have ever understood the appeal of GUI tools especially for something like git. I do use magit, but even then I do most manipulation with the command line interface
6 replies →
Probably just GitHub (the browser UI). If you want to do it offline or from the command line, I understand why you might hesitate want to check out files, but stashing in git is extremely easy.
git log, copy paste hash, git checkout
If you have a dirty wd, stash.
But, to be honest, I almost never perform that action, and when I do I use the web browser.
3 replies →
Try doing a merge with IntelliJ's 3-way merge UI. It's flippin' fantastic compared to roaming through the files and removing sections between >>>> and <<<<.
Command-line git allows you to specify a mergetool, many of which are capable of three way merges.
2 replies →
Many people are visual. It's a lot easier to see changes, compare diffs, and generally follow the development branches through a GUI instead of through a command line.
I think the main advantage of GUIs in general is a contextual, curated explorability that is often lacking in CLI tools. The GUI is stateful, allows the user to click on things and prod it, and hopefully shows the most frequently used features for that context. This allows even complete newbies to be productive almost immediately.
For something like git, the slightly more visual representation is a benefit to many, too.
I'm not here to knock CLIs, there are a set of tradeoffs to be made, and CLIs win in many cases (flexibility, scriptability, being able to copy snippets you frequently use, etc). The above does tend to hold true, however.
Git is famous for being unintuitive?
Infamous, and a more accurate description might be that discussions about git are well-known for quickly descending into discussions about whether or not it's intuitive and whether or not that matters since you use it every day you'll soon get it and no longer care that much how intuitive it is anyway.
Just give thanks that you did not have to work with the likes of CVS and such.
One of the advantages is you can easily explore what changes were made and merge conflicts through the tool.
I like to drag and drop commits into an order I want when doing an interactive rebase.
That's easy with the TUI
2 replies →
I wonder the opposite thing: why do people try to use git in a terminal?
Its output is so rich and complex that it's impossible to make it legible outside of a real GUI, with graphics and colors.
for a new person, it's almost impossible to get anything done with git command line
You could say that about any tool, of course you have to spend some time to understand how to use it safely and effectively.
'for a new person, it's almost impossible to get anything done with a table saw'
3 replies →
I think most folks like a graphical merge tool, such as opendiff, or at least that's what I've been able to glean.
I work on a lot of repositories, having a GUI makes it really easy to change context and getting up-to-speed quickly.
As someone else mentioned here, the graphical merge tool in IDEA is extremely powerful. Plus keyboard shortcuts to all the main Git actions. It's overall more efficient. However I always use Git IDEA + Git CLI side by side.
Switched to Fork from SourceTree, never looked back.