I find it easier than subversion. At least, the workflow easier anyway. It's pretty simple to make a branch do your thing then merge the branch with the trunk. It only takes like 4 commands to do all of that.
I think most of the difficulty is trying to do tasks that are "optional" (ie, not needed for ideal usage of the program, but you will need at some time). For example, how do I stop git from making my scripts non-executable? Fortunately, there's absolutely no reason to remember (learn) these kinds of things. Just google when you need them. I still haven't memorized the syntax to restore a single file from an older commit, but I know where to find the command when I need it.
Pretty much all you need to memorize is:
Cloning (getting a new repo from the internet)
Checkout (switching branches)
Pulling (getting changes from remote repo)
Pushing (adding your changes to the remote repo)
Diffing (viewing changes you've made, or changes between commits, branches, etc)
Checking the status (to see which files are changed, etc)
Adding (staging files to commit)
Commiting (creating a revision with staged files)
Branching (creating a new branch)
My advice when going from SVN to git is to FORGET EVERYTHING ABOUT SVN! If you try and apply existing knowledge about SVN to git, it will bite you in the ass. So don't assume that because you're competent with SVN that you know anything about git. This will stop misconceptions from hindering your learning.
Where I work, literally every line of code is written on branches. Each feature has a branch. Nobody ever commits directly to master. We only merge tested code that had passed code review into master. Works brilliantly. Merge conflicts are very rare and you get to use version control, committing every step of the way even for half finished pieces of work.
The thought of only committing finished, working code into version control sounds horrible...
12
u/cakes Feb 06 '15
Is there any good resource out there for learning to use git? I've tried about 4 times, and always say "fuck it" and go back to using subversion.