I've been tasked with giving a presentation on Git to my colleagues, who are almost entirely Windows users who are used to using TortoiseCVS. I've been using Git for about a year, but I almost exclusively used the Unix command line interface.
So I've been trying to get familiar with the Windows GUI Git tools including TortoiseGit. But it seems to me that this is more than just GUI skin over the Git command line interface, and actually abstract some things completely away, specifically the index.
For instance, when I right click a new, unversioned file in the Windows Explorer, I can select "Add" from the TortoiseGit menu, and later commit this file, but this same menu item is missing from files which are already in Git, in which case I only see the option "submodule add".
Is there no way to interact with the index with TortoiseGit?
I'm looking for analogues to git add
, git diff --cached
, and git reset HEAD
, specifically.
Here's a message to the Google group about this, but it was from last summer.
I'm using TortoiseGit version 1.6.5.0 and msysgit version 1.7.4.msysgit.0, if it matters. I installed these just a few days ago so they are probably reasonably up to date.
TortoiseGit is a free open-source client for the Git version control system. That is, TortoiseGit manages files over time. Files are stored in a local repository. The repository is much like an ordinary file server, except that it remembers every change ever made to your files and directories.
These files are also referred to as "untracked files." Staging area is files that are going to be a part of the next commit, which lets git know what changes in the file are going to occur for the next commit. The repository contains all of a project's commits.
Find the id_rsa file that you created in step (3), you will be prompted for your passphrase. Enter it. IMPORTANT: bring up the TortoiseGit context menu, go to settings .
The Git index is a staging area between the working directory and repository. It is used to build up a set of changes that you want to commit together. To better understand the Git index, then first understand the working directory and repository.
The answer is: no, you can't.
For me, TortoiseGit is a tool that you can use to make the transition from – in your case – CVS to Git easier (like I wrote in my answer to Does TortoiseGit actually make Git a lot easier to use like TortoiseSVN?). But once the transition is made and your colleagues get more familiar to Git, it's time to come up with the real tools.
And the most powerful tool to interact with Git is the command line. Period. The Git Gui and gitk
are also usable, bring some convenience but lack explorer integration (at least in terms of overlays). But in times with multi headed development boxes: why don't keep the Git Gui open on one monitor (the one used for general management stuff) and work on the other?
I recently also did an introduction to Git in my team at work. We were used to TortoiseSVN, so I also showed them how to add files using Tortoise, how to commit and so on. But on every slide, I also noted what they have to type in the Git Bash to achieve the same result. That way, once they're a little more experienced, they can take out the introduction slides and peek at the commands they have to use.
To a limited extent, you can perform those actions within TortoiseGit. For instance, there is a reset dialog. They aren't prominently featured (I think) because using TortoiseGit means you have less need for the git index -- there are convenient and highly functional GUI methods for choosing and reviewing the things you intend to commit, so the index becomes less necessary.
That being said, TortoiseGit brings many useful things to the table for both the beginner and the advanced git user, though it is only a complement, not a replacement, to commandline.
As an additional transition, you might be interested in a batch file I use that blurs the line a little by allowing convenient invocation of those TortoiseGit GUI windows from the commandline: https://github.com/ses4j/tgit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With