Yeah the initial intro to git takes about 10 minutes. Git add ., git commit, git push. Done. You learn new features as they become required. There is no need to read the entire manual and understand how git bisect works when you are working on your personal blog.
Rebase isn’t dangerous in safety terms, the main danger is it can cause frustration when people use it without understanding it first. And as long as people know to not rebase public history, the frustration is usually limited and contained and easily resolved. It might be dangerous if frustration leads to spastic repo nuking, which can happen.
Btw A lot of people who say rebase is dangerous use git stash and have no idea that stash is one of the actual dangerous things to do, much more dangerous than rebase, and not any easier than branching.
“If you mistakenly drop or clear stash entries, they cannot be recovered through the normal safety mechanisms.”
Rebase is the opposite of dangerous, it brings everything back to a specific state and forces the dev to fix conflicts themselves rather than make it someone else’s problem.
What’s dangerous is using things one doesn’t understand and not asking how to use it or reading up on it.
I was thinking about this the other day. The learning curve for git isn’t steep at all, because it’s possible to learn git so slowly. It’s possible to use git with any level of proficiency. If you had to sit down and “learn git” before you could use it, that would be brutal and we would be using something else.
I stick to Atlassian Sourcetree git GUI for most git stuff. I drop down to git command-line for cherry-picking, squash-merging, updating a not-currently-checked-out branch, etc. Sourcetree works well with sub-repos. I use integrated kdiff3 for visual diff (when I need to go beyond Sourcetree's already-excellent diff viewing). Sourcetree's killer feature is easy staging/unstaging different "hunks" of files, or even individual selected lines.
I use mostly Jetbrains IDEs, I'm sure their git/VCS integration is pretty good, but I stick to Sourcetree plus occasional command-line for most stuff.
I'd probably fail a git-oriented interview section because I'd fail at the command-line for some common things for which I just use Sourcetree. In any case though with my approach I've seen I generally get a much better overview of code changes and branching strategies and have a more flexible and convenient experience that many other coworkers over the years.
I haven't used Sourcetree in several years, how's it hold up today? When I was using graphical clients I hopped between Sourcetree, GitKraken[0] and Sublime Merge[1].
I loved SourceTree but abandoned it as soon as Atlassian made it impossible to use offline. I don't want an Atlassian or bitbucket or whatever the fuck account. Sublime Merge is pretty good IMO, but not good enough I'd want to pay for it.
I’ve used SourceTree maybe a month or so ago, and it was completely offline for a repo that’s not pushed to or connected with Bitbucket or Atlassian. Maybe initially there was a dialog box to create an account with or sign up for Bitbucket, but that was easily dismissed.
SourceTree was originally shareware – I'm pretty sure I expensed a license at whatever job I was at. When Atlassian bought SourceTree in 2011 their grand plan was to pimp it out in order to drive customers to Bitbucket. Eventually they were going to charge for it (so the worst of both worlds really). I noped out because it was clear that Atlassian wanted SourceTree to become a bitbucket client instead of remaining a git+subversion client.
I don't want a bitbucket account and never bothered to check how often it would phone home to ensure you had an up-to-date bitbucket account. I think the Sublime folks have a better track record here and I fully expect Sublime Merge to get to the point where I'd want to buy it if I wanted a git GUI.
Unfortunately for Atlassian, by 2011 Bitbucket already lost out to Github and they hadn't realized it yet.
I think Atlassian lifted those restrictions for Sourcetree at some point. I remember having to sign up for Bitbucket, etc., at one point, but my last few installs (on different companies' work computers) haven't put up any such roadblocks lately.
I certainly struggled to grok git early on, but I feel this is largely because the documentation and explanations were convoluted. I think you can grasp it quickly by just understanding a few key concepts, namely: a commit is a set of changes to files, branches/tags are basically references to a specific commit, commits have an ancestor commit, remotes track distinct copies of the graph. Then you just need to know which commit you are interested in, how to navigate the graph of commits, and how to merge deviated sets of changes. If you understand those things, you know everything you’ll need to 90% of the time.
I always find this to be a weird statement, primarily because I think there are like 50 other things that are waaay more difficult when it comes to software development, but I hear people time and again say git has a big learning curve.
I mean, once I understood the major concepts of git, and understood how its model was fundamentally different from something like svn or cvs, it wasn't that hard to use it. Sure, it took time to learn, but given that it's a tool so integral to my working life, I'm fine with spending a little more time learning it if it makes me more productive in the long run.
Is there a VCS that doesn't have a steep learning curve? I've used subversion, mercurial, darcs, and bazaar to varying degrees. None were particularly easy to learn.
Right, but my point is you are STILL going to have to learn git anyway, since so many companies and open source projects use it. Your choice is not to learn git OR the other SCM, the choice is to learn just git OR git and the other SCM. You aren't saving any effort.
Could you be obsessed with effort reducing? If yes, you may want to look at it like an investment: you initially spend effort, time or money to learn something new only to get back more later.
I've used git for a decade and I still haven't learned half of it. It's got to be one of the most byzantine pieces of software I have ever encountered.