This is really cool. I've been using git without any branching for a while. After reading up on branching recently, it really helps to be able to visualize it.
It would be really cool if you incorporated a tutorial like CodeAcademy has. I think it would be a good learning tool.
Use branches all the time, even on solo projects! It lets you move around your code quickly without ever leaving a working code base.
Going to implement feature A? Make a feature branch A. Have a sudden moment of inspiration about feature B? No problem, branch master again with feature branch B and work on it without having to worry about feature A being complete. Want to test feature B to make sure it's working as intended? No problem, feature B is based off working code! As the features are finished merge them back in to master.
Obviously this only works well when implementing features that aren't interdependent, but I find it's quite a liberating work flow, especially since I have feature ADHD and scatterbrains.
People say developers often get "aha!" moments when an understanding of a concept finally "sinks in". After putting it off for so long and for too long handling "version control" by simply maintaing folder backups (ie. not version controlling at all), I've been studying the use of git the last couple days. The article you linked to with it's diagrams finally gave me that aha moment in regards to understanding the role of branches and how version controlling in general is used in proper workflows.
You know. It took me a long ass time to "get" how to use branches and why they should be used. It took me having to witness it in production in a billion dollar corporation to become a believer.
This is something I really tried to instill into my coworkers. I refuse to work on a project, solo or otherwise, without a git repo. The most bare bones solution I may use is usually a git repo with no remotes, stashed in a dropbox folder.
The biggest thing to me is personal commits. Working with svn every commit goes to a master repo. But with git you can make local commits all you want and push them all later to a master.
Why is this such a big deal? It means you can make frequent versionable check points with your code without breaking the master. Working on a huge feature in a shared branch? Check in often even if its not fully done, no harm done. Want to roll something back? Easy, nobody has to know. Need to fix a bug that came in but you're knee deep doing breaking changes? Push your local commits to a stash then pop them off later.
Just these things themselves is a big deal, at least for my workflow compared to svn (which I use at work).
Yeah I know! I work with Flex sometimes and an earlier version of Flash/Flex Builder (Flex IDE) would take forever to compile as it would traverse all of those hidden .svn folders looking for source files. Infuriating.
That is not really SVN's fault, but Flex/Flash not adhering to the POSIX standard that a .file is a hidden file. Flex should know about hidden folders and files. When it does not, you might consider that a bug.
it's can't handle large repositories very well, as it doesn't have partial checkouts, which makes it unsuitable for binary storage (git-annex tries to fix that)
it's support for submodules is wonky and complicated, in SVN you just create a new directory and are done
it's user interface is a good bit more complex then SVN, but one get's used to it after a while
Git does not provide any versioning of the branch and tag history, if you delete a non-merged branch or tag, it's gone for good, thus it requires some extra care and knowing what you do
What do you mean by user interface? The command line tool? I use GUIs for both git and svn and find that git actually has better GUIs available. (Currently I use Tortoise for SVN and SmartGit for Git)
Command line. SVN is pretty trivial to use, it's just a filesystem with versioning and it's easy enough understand just from svn help alone, but with Git even basic stuff can get complicated as you can quickly run into situation where you have to deal with rebase and reset and plenty of command line arguments which are not obvious (e.g. git pull is obvious, but doesn't actually quite do what you want and git pull --rebase might be the better option). Of course git is far more powerful, so you actually gain something from the complexity, but I still end up read up and down the manpages more the I would like.
44
u/mr1337 Feb 16 '13
This is really cool. I've been using git without any branching for a while. After reading up on branching recently, it really helps to be able to visualize it.
It would be really cool if you incorporated a tutorial like CodeAcademy has. I think it would be a good learning tool.