I don't know much about git and I want to learn more. Over the past 4.5 years, I have used Mercurial for all development projects, using the TortoiseHg Workbench tool. Please help me out here!
- Where should I start for learning about git, with coming from a mercurial background?
- What GUI tool/tools for git resemble TortoiseHg Workbench?
Top comments (5)
The official Git tutorial. Either in the console via
man gittutorial
, or online at git-scm.com/docs/gittutorial.While this focuses on CLI usage, you really should make sure you understand the CLI usage before you worry about a GUI.
Big things to remember coming from Mercurial:
hg commit
,git commit
doesn't pull in all the changes in the working directory by default. You have to either usegit add
to stage specific files to be committed, or usegit commit -a
to pull in everything. This is annoying at first, but it's really powerful because you can add individual parts of files to a commit independent of any other changes in the file, which makes it much easier to split out a big sweeping set of changes into logically independent commits.git pull
is equivalent to runninghg pull
and then eitherhg update
(if you have no new changes on your local branch relative to upstream) orhg merge
(if you do have changes). Usegit fetch
if you really want to just pull the references without updating local history.At some point there was a Tortise GUI for Git as well, I'm not sure if it's still around or not.
Officially, current versions of
git
come with agit gui
command and a tool calledgitk
which provide GUI functionality. You may have to install additional packages for these on Linux systems.Other popular GUI's include GitKraken, git-cola, SmartGit, and qgit. I can't comment on how well any of them work or not though as I pretty much stick to the CLI interface (I do the same for Mercurial as well though).
I've found these resources to be the most helpful when it comes to learning/using git:
I agree with Austin re: getting comfortable with CLI before GUI although that's really your perogative.
And this one - when things go bad :)
ohshitgit.com/
This is fantastic! Never seen it before. Bookmarked!
cli. cli. cli. We just switched from SVN to Git and I encouraged everyone to use cli. Someone pings me a day later with a question and then they mention they are using some Git gui tool. Sigh.
Learn cli. Get a good understanding of how Git works and THEN feel free to use a Gui or whatever.