This question:
Can you interact with the index/staging area with TortoiseGit?
takes the position that TortoiseGit's main function is not to eliminate the need for the git command line, and in general, I agree.
However, git-gui has a feature I use a lot (maybe to compensate for bad workflow): the ability to selectively stage or unstage hunks or lines from the current patch in order to split a bunch of interspersed changes into coherent changesets in multiple commits.
The command-line alternative (for me, at any rate) is a bit clunky, so, ideally, I'd like to do the same selective committing in TortoiseGit.
So far I haven't found a way to do this, and I suspect, from the answer to the other question, that it isn't possible. Can anyone confirm this, please?
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.
One prerequisite of TortoiseGit is that it requires an already installed (command line) Git client which provides a git.exe . Git for Windows is recommended (Cygwin and MSYS2 Git also work, see the section called “General Settings” for configuration.
Difference between files. If you want to see the differences between two different files, you can do that directly in explorer by selecting both files (using the usual Ctrl-modifier). Then from the explorer context menu select TortoiseGit → Diff.
TortoiseGit is a graphical UI for Git in Windows. TortoiseGit is unique because the primary way to interact with it is through the Windows Explorer context menu. To work with TortoiseGit, you have to have a Windows Explorer open to the current working directory and then two mouse clicks away from most functions.
Yes it does now: see issue 222 - it takes the same approach as TortoiseSVN where you:
- right-click on file, choose "Restore after commit"
- TSVN creates a copy of the file outside the working copy, the file is shown differently in > the commit dialog (maybe an overlay icon or a different color)
- user can double-click the file to open it in TMerge or some other diff tool and undo all the changes that should not be committed, then save those changes
- commit
- after the commit is finished, the copy of the original file is moved back
(From TSVN Issue 68)
The only client on windows that has full support for selective staging in the GUI I've seen so far is SmartGit.
Thus said it has weak sides too, comparing to TortoiseGit or GitExtensions.
For me, main showstoppers in SmartGit are:
I remember that there was something else, but evaluating last version of SmartGit now I can't find it. Either it was fixed/added or I just forgot what thing I can't do that time.
In any case I'm using both GitEx and TortoiseGit for some things and for everything else console is the best tool.
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