5

I was going through some tutorials on TortoiseHg. Despite having a rich GUI, the first examples are given using command line options. Does the ideal usage involve command line or it was started that way so one has idea of what is happening under the hood and GUI internally uses this command anyway.

Shamim Hafiz - MSFT
  • 4,123
  • 7
  • 38
  • 46

12 Answers12

35

Use what you want. Use what makes sense for what you are doing now.

While I'm mostly a command line guy (I use the GUI only to get a graphical representation of revision graph), I've trouble to understand why you think using the command line gives you a better understanding of what happens behind the hood (well excepted for GIT :)), usually there is a clear mapping between the two even if CL may give you access to some little used features.

Now in my opinion, automating what can be automated in the process is part of the job and for that, CL is mandatory.

AProgrammer
  • 10,404
  • 1
  • 30
  • 45
  • I was thinking of the point mentioned in VonCs post. – Shamim Hafiz - MSFT Jun 07 '11 at 07:32
  • 4
    +1 for the comment about automation requirements. I'm too lazy to learn (en too old to remember) little used, esoteric command line things, so prefer a GUI, however I would not touch a tool that did not have a CL at least as feature rich as the GUI. – mattnz Jun 07 '11 at 09:27
14

It's easier to write tutorials using the CLI. All you need is text! Trying to demonstrate workflows in a GUI means screenshots, and circles and arrows and a paragraph on the back of each one explaining what each one is.

Use whichever you want. There is no "right" way.

Alex Feinman
  • 5,792
  • 2
  • 27
  • 48
  • 1
    This answers an implied question in the OP: "Since TortoiseHg is a gui, why do the first few tutorials use the command line?" – jhocking Jun 07 '11 at 16:09
  • I personally found it easier to understand tutorials using the GUI - possibly others are the same? – fostandy Jun 02 '15 at 08:47
  • Note that I said _write_, rather than read. GUI tutorials are often much easier to understand! – Alex Feinman Jun 02 '15 at 17:12
11

I prefer a mix of both.

The GUI is fine for day-to-day use of the core functionality.

However, it is very useful to know how things work "behind the scenes" on the command line -- especially if you want to make use of more advanced features, or write scripts to automate some common tasks.

Matthew King
  • 2,200
  • 1
  • 16
  • 17
10

Ideally, you'd want both.

Generally, the commands are implemented as a command line, which means that you have the following benefits:

  1. You can put any number of GUIs on top.
  2. You can integrate it with whichever tool you like.
  3. You can use it in scripts.

The latter is extremely important. Want your build server to checkout your code, and it doesn't have a direct API to the system? Well, with a command line interface, it will be able to work. The same applies to everything.

Pang
  • 313
  • 4
  • 7
gbjbaanb
  • 48,354
  • 6
  • 102
  • 172
  • 1
    Why is this "ideally"? If you're comfortable with the CLI alone, then I don't see where you could perceive a loss of some sort. – tripleee Jan 23 '13 at 09:16
5

It started as a command line. Look at svn, bzr, hg, git... Some needed GUI, because they were to lazy to remember commands and wanted buttons there fore most of existing GUI's are juts overlay for command-line interface, although there are some such systems that are GUI only (those are usually unseen and are implemented in some text editors).

Sure both are needed. In windows its bit hardcore to use cmd to make commits and use VCS while in Linux i personally use command-line mercurial every time since i get things done faster and cleaner.

Where it should be used from (GUI vs command-line)? You got the choice. Learn both (you'll need it) and then use the better one in your personal opinion.

More on topic: http://en.wikipedia.org/wiki/Revision_control

JackLeo
  • 1,977
  • 12
  • 20
3

Whatever works for you. I have seen GUI masters that are so fast it puts a lot of command line users to shame and vise-versa. The only thing that matters is choosing something and learning the ins and outs of it. Once you're very good what you chose, learn the other way.

Ali
  • 316
  • 2
  • 8
2

I think it is the general answer for types of software people use regularly: Initially GUI and once someone has mastered the concepts, then more and more command line. I am currently using a specific version control tool in a once per month basis. It would be impossible for me to remember any command line syntax. So only GUI.

On the other hands after some months of using subversion, it became a command line only affair, no need for visuals.

Dimitrios Mistriotis
  • 2,220
  • 1
  • 16
  • 26
1

TortoiseSVN for SVN on Win32/64, because of the icon overlays for visual feedback.

Otherwise: GUI for less-frequent operations (superior discoverability & better affordances), command-line for most common operations (increased parsimony, fewer keystrokes).

William Payne
  • 1,161
  • 8
  • 20
1

You'll see that most answers, refer to use both. Learn to use both, and use each method acording to the situation.

The G.U.I., is usually more easy to use, but, there are scenarios, wheter you have to stick to the command line version. Some programming I.D.E. include or can be extended with a G.U.I. for the C.V.S. of your choice.

Sometimes, you may need to use a C.V.S. for files that aren't applications, or aren't supported by your programming I.D.E.

I worked once, in a VB6 project where the VB6 I.D.E. included it own C.V.S. included with its G.U.I., unfortunately it didn't work well, and sometimes, corrupted files, or lost some versions. We had to install an Open Source C.V.S., that we had to use from the command line.

umlcat
  • 2,146
  • 11
  • 16
1

Use whatever makes you most productive, but learn the CLI regardless. It's the lingua franca of the VCS, so you'll need to know it to ask and/or answer questions on places like stack overflow. Also, the most advanced features are only available on CLI, so chances are you will eventually end up wanting it, even if only rarely. You can also mix and match clients. I personally am most productive using a GUI for history visualization and manually resolving merges, and the CLI for everything else.

Karl Bielefeldt
  • 146,727
  • 38
  • 279
  • 479
0

If you have a lot of repeated operations, such as adding some but not all files

git add file1
git add file2
git add file3
...
git add fileN

then GUI with checkboxes is definitely better.

If you need to enter hashes as command arguments, then GUI is definitely better (allow to select and no need to remember the hashes)

linquize
  • 1,150
  • 1
  • 11
  • 20
0

The GUI is mandatory when you have any tool deployed to a large set of users.
If that tool has some multi-step operations (workspace creation, multiple files merge, ...), a wizard dialog is welcome.
If that tool can present a graphic representation of some state (history, version tree, branches and merges, ...), a user will appreciate a graphic window instead of a wall of text in a shell.

But a CLI is also mandatory every time any GUI operation fails: the same operation done from a CLI often generate an error message much more precise and complete than the error dialog box displayed by the GUI.
And any scripting can use of course a CLI for automation purpose.

VonC
  • 2,484
  • 2
  • 20
  • 19
  • I assume you mean CLI in "the same operation done from a GUI often generate(s) an error message much more precise..." – DrAl Jun 07 '11 at 08:11
  • @DrAI: true, I fixed the... "typo". – VonC Jun 07 '11 at 08:13
  • 2
    Only if the GUI is crappy and hides details...the bulk of the SCM systems I use end up dumping the same error message to console or to the GUI, for exactly this reason. – Alex Feinman Jun 07 '11 at 13:31
  • 1
    GUI is never mandatory unless it is something graphical. VCS is not graphical. – alternative Jun 07 '11 at 14:19
  • 3
    @mathepic: believe me, with a large set of users, you *want* a GUI. And VCS can be graphical. Tortoise(SVN or Git), or the ClearCase version tree are a clear illustration of that. – VonC Jun 07 '11 at 14:47
  • I didn't say it couldn't use a GUI. I'm only saying a GUI is mandatory if theres some implication of graphics, ie pictures. Other than that you don't need it per se. – alternative Jun 07 '11 at 15:53
  • @mathepic: fair enough. I have clarified my answer to detail why, in the context of a VCS, a GUI is needed when deployed for a large set of user (myself, I prefer going full CLI ;) ) – VonC Jun 07 '11 at 16:05
  • I still don't see why a GUI is *necessary*. It might be useful, but it certainly isn't necessary. – Rein Henrichs Jun 07 '11 at 16:40
  • @Rein: it is necessary to easy the tool introduction to said large set of users. Since a VCS isn't the primary software they will use, any GUI that facilitates the operations of what they see as yet another soft to take into account in their development workflow is more than welcome. Mastering the CLI of a VCS isn't their mission. – VonC Jun 07 '11 at 16:44
  • I agree that it's useful. You still haven't presented an argument for "necessary" except for stating that "it is necessary". If a tool only provides CLI support, mastering that CLI *necessarily* becomes their mission. – Rein Henrichs Jun 07 '11 at 17:30
  • @Rein: I came up with the term "necessary" after my experience of deploying many tools for many (hundreds of) developers: they will express that "necessary" aspect very forcefully to you when you are trying to introduce a new tool. As for mastering the CLI, believe me, they (the developers) will make that *your* mission, not their. If there is only a CLI available, they will *demand* that you develop the necessary utilities in order to encapsulate any complex CLI operations. – VonC Jun 07 '11 at 17:50
  • The "they" that I am familiar with are comfortable with command line tools. It's too easy to ascribe support for your arguments to a fictitious "they". Put quite simply, if a single developer can get by without a GUI, it is not necessary based on the *actual* definition of the term. In any event, this discussion isn't really productive. – Rein Henrichs Jun 07 '11 at 18:37
  • @Rein: it isn't so much "they" the problem (and "they" aren't fictitious at all), as their IT management: when you have hundreds of developers to manage, you (as IT manager) want their time spent on the actual development, not on some CLI of some tool. In that context, a GUI helps for daily operations, while CLI is reserved for guys like me to build utilities helping them to not have to look under the hood and keep them focus on their job. – VonC Jun 07 '11 at 18:55
  • Once again, I don't dispute that GUIs are useful to some people or that some people may find them necessary. – Rein Henrichs Jun 07 '11 at 19:11
  • @Rein: yes, but I obviously failed to convey the proper context (which I have known for the last 15 years) which makes GUI quite mandatory. Never mind. I still learned something out of this, including your interesting profile ;) (you were using Git for Agile projects in 2009?! I only manage to introduce Git this year! And it was painful: http://stackoverflow.com/questions/5683253/distributed-version-control-systems-and-the-enterprise-a-good-mix/5685757#5685757) – VonC Jun 07 '11 at 19:15
  • @VonC No worries, I think I'm just allergic to generalizations ;) Yes, have been using git for a while now, but it's relatively easy to introduce when you're the technical lead. – Rein Henrichs Jun 07 '11 at 20:51