10 Years of Git: An Interview With Linus Torvalds 203
LibbyMC writes Git will celebrate its 10-year anniversary tomorrow. To celebrate this milestone, Linus shares the behind-the-scenes story of Git and tells us what he thinks of the project and its impact on software development. From the article: "Ten years ago this week, the Linux kernel community faced a daunting challenge: They could no longer use their revision control system BitKeeper and no other Software Configuration Management (SCMs) met their needs for a distributed system. Linus Torvalds, the creator of Linux, took the challenge into his own hands and disappeared over the weekend to emerge the following week with Git. Today Git is used for thousands of projects and has ushered in a new level of social coding among programmers."
And yet, no one understands Git. (Score:3, Informative)
I hear from so many people who love git, and also from so many people who see it as needlessly complicated to the point of getting in the way of getting things done. If that latter view didn't have any truth to it, this page wouldn't exist:
http://git-man-page-generator.lokaltog.net/
So, which is it? A useful tool, or simply a way for the the brightest technology people to feel smarter than everyone?
Re:And yet, no one understands Git. (Score:5, Informative)
Re:And yet, no one understands Git. (Score:4, Interesting)
As someone mostly in the "I dun get it" crowd, I'll say the problem for me is that I feel like while I can use it, I don't have a great deal of understanding as to what it's actually doing outside of the basics. I feel like I'm following a bunch of recipes that I know work.
With svn (which admittedly I've used for many years and on sizable projects vs git which I've used for months and on small stuff), I feel like I have a really good grasp of the whole thing. Sure there are some subtle bits I don't know because I've never needed, but I know the important bits, and I feel like from that I can solve just about any problem I run into by understanding what svn is trying to do and why it's not working.
I get that at least some of this is just inexperience, but I think even with experience, git seems far more complex and nuanced than svn, which has a relatively consistent way of working and a seems to have a much smaller set of features. I feel like I got comfortable with svn way faster, and at that point I was only mildly familiar with version control in general.
I know I'm gonna get flamed for this, but just wanted to provide some insight into the mind of someone who hasn't jumped on the git bandwagon yet.
Re: (Score:3)
The team I was on was using cvs for a long time (quite successfully) and then switched to git. I could never use git without having a page of cheat-sheet notes in front of me. There were some good things about it, some really good things (the code merger was magic), but you had to stay on top of the state of your code in a way that CVS never required.
Command non-orthogonality is its weak point (Score:4, Insightful)
For instance, it is easy to add files to staging:
git add
Oops! A bunch of other things got added, because I'm a newbie and haven't yet tuned my
OK, have a guess at undoing it:
git unadd
wtf?...nope..
Frustrating searching to find that git reset is really unadd. Yeah, I could guess that! not.
And that's the crux of it. Sure you can add git aliases, but an xxx/unxxx pattern could have been built in right from the (ahem) git-go for any sensible command. Git commit/uncommit... merge/unmerge... etc etc.
And the great thing about git: Linus realised disk space was becoming to cheap to meter. Why bother crunching a delta on something when it was easier to just store compressed blobs. Thus the advantage of simple, fast and cheap (pick any three) branching.
Re: (Score:2)
Git is a crap SCM.
Git is fantastic for integrating changes from everywhere like Linus does.
True - we use the hell out of it for DevOps (and for the same damn reason).
Otherwise, truth be told, *all* SCM packages suck. Badly. Git just sucks less.
Re: (Score:2)
Re: (Score:2)
This is not intended as simply a "citation needed" response.. The earliest case I remember is from the Mac OS 7.5 T shirt:
https://www.flickr.com/photos/... [flickr.com]
Re: (Score:2)
It isn't complicated.
Yes it is. Ten years is about how long it takes to figure out.
Re: (Score:2)
Here is an even simpler guide: A Guide to GIT using spatial analogies [tartley.com].
Re: (Score:2)
Every SCM has an "add step" otherwise: how should the SCM know which files to track and which not?
This post is not insightful but brain dead.
If you work from the command line and don't like to add commit messages, then ford god sake: learn how to use a command line! What about an alias or a script with a default commit message? Wow that was easy!
Re: (Score:2)
How the !@$ do I make "-a" default for commit? The fact that it's NOT the default is one of the !@$!@$!@ confusing things about git.
(git is more difficult/confusing than svn which is more difficult/confusing than cvs.. and no, cvs wasn't the first source repository I ever used.. if svn truly was "a better cvs" like it claimed, without the huge URLs, I'd say it was undeniably better.)
Re: (Score:2)
You write a shell script with the same name of the git command you want to use.
Put it in front of the git command in the PATH.
Forward all options to the original command and add the "-a" option.
On the other hand I'm pretty sure there is an GItOPTS or similar named environment variable where you can preset some stuff as well.
Hope that helps.
Re: (Score:3)
Step 2 - if you're not a working developer or in DevOps, you really shouldn't be using this thing, so, like, stop there. ;)
Okay, just kidding. In all seriousness, Git can have a steep learning curve to the uninitiated. Then again, so can CG compositing/modeling, systems administration on a CLI-only install of any UNIX/Linux flavor you care to name, or even to beginners of Powershell on Windows.
But then, like most things, I've found that after *using* the thing, it goes from impossible to tolerable, then to
Re:And yet, no one understands Git. (Score:4, Interesting)
Re: (Score:2)
I made a post about this above, but yeah, that describes my current relationship with git, and is one of the reasons I don't enjoy using it.
I feel like I truly know svn, I understand what it does and am very comfortable with how it works. Part of that is just having used it for a long time, but I do feel like git is much harder to wrap your head around.
With git I feel like I'm just following a bunch of recipes that I know work (or seem to work), and that's really not a good way to go about anything. Every t
Re: (Score:2)
Very few people actually know their version control software. Most people know the basic commands, and that's the case for pretty much all of them. Git is not much different in that regard.
And I suspect some don't understand version control at all. I've worked with the following (non-git) setup:
One production branch, at any time one active development branch. When we merge to production, we branch off a new development branch. Could it get simpler? I don't see how. Yet people manage to start developing on the prod branch (that they have access to for hotfixes), fail to understand that bugfixes to prod must go into dev or be overwritten at the next merge, branch the dev branch instead of the p
I prefer continuous trunk... (Score:2)
I prefer the model where the "master" branch is the continuous trunk of development. When you want to release, you branch off for that release.
Functionally equivalent, but has the nice property that most stuff goes into "master" and only bugfixes/backports or special-case stuff goes onto the release branch.
Re: (Score:2)
Re: (Score:2)
You have to understand the data-structure, how files, directories and commits are all content-addressable objects. The linkage of the commits by means of their id's must be understood.
To understand merging you should have used diff and patch a few times.
This is all.
With these few concepts anybody, who can write a program, should be able to understand git. To invent new use-cases or work-flows is another thing, but comprehending a given usage of git should be straight forward.
Re:And yet, no one understands Git. (Score:5, Funny)
You have to understand the data-structure, how files, directories and commits are all content-addressable objects. The linkage of the commits by means of their id's must be understood.
Git: the best file system anybody ever confused with a version control system. :-)
Re:And yet, no one understands Git. (Score:5, Insightful)
You have to understand the data-structure, how files, directories and commits are all content-addressable objects. The linkage of the commits by means of their id's must be understood.
See, here's the thing. Why should I have to understand internal data structures in order to use a piece of software? Imagine if you made a word processor and people found it difficult to understand, and you said, "It's easy once you understand that the words in the text are stored in a hash map along with a structure with various flags that encode things like whether it's italic or not." People would look at you funny and go back to using Word.
Git Internals (Score:3)
Why should I have to understand internal data structures in order to use a piece of software?
Because you're not used to thinking about source code the way Git thinks about source code. Git is very much like a database from a usability standpoint, and you will probably get into bad trouble trying to use either without understanding both the problem that they are trying to solve and the implementation. If you do read about these things, you will understand that git's internals make sense, the decisions it makes are logical, and the user interface is (mostly) transparent and simple. Revisions are hard
Re: (Score:2)
Because you're not used to thinking about source code the way Git thinks about source code. Git is very much like a database from a usability standpoint
That's probably a significant part of the problem. :-)
Re: (Score:2)
After a point, users must develop a deeper understanding of how a given software package works in order to use it effectively.
You mentioned word processing as an example... carrying that along, Microsoft Word faced a huge amount of resistance from WordPerfect users who had internalized WordPerfect's 'stream-of-markup' model for representing formatted text. In both cases, you could highlight text and make it bold, but WordPerfect's model was much clearer to more advanced users. Microsoft has tried to replica
Re:And yet, no one understands Git. (Score:4, Interesting)
I hear from so many people who love git, and also from so many people who see it as needlessly complicated to the point of getting in the way of getting things done. If that latter view didn't have any truth to it, this page wouldn't exist:
http://git-man-page-generator.lokaltog.net/
So, which is it? A useful tool, or simply a way for the the brightest technology people to feel smarter than everyone?
Personally, I'm in both camps. I both hate and love Git. I hate that I have to explain and provide "scripts" to developers that explain how the project uses Git and I love that I can manage my project in multiple ways, depending on my needs.
Git's problems stem from it's Unix like command line basic user interface. It's not a surprise that they decided to go with this kind of interface, they where basically Linux developers after all. In the tradition of good CLI's, Git is full featured, meaning it does a LOT of things, or really it supports doing things in a lot of different ways. I love the flexibility. But, unless you understand what Git is doing for you under the covers you may not know which of the confusing commands in Git you need to use. If you don't understand how your project is using Git, it may be difficult for the newbie come up with the necessary commands to get things done.
Personally, I end up writing scripts for my developers. I force them into following a set procedure to "check out" the source, do their local development and get their changes though the review cycles and into the main repository again. Developers don't like scripts like this and because it's a script that describes how they use git, they think they don't like git. What they really hate is being told exactly what to do...
I love git because it allows me to control my project's source. It keeps local backups and my history on MY machine, but doesn't expose others to my mindless rambling commits unless I decide to push them. I love the flexibility to manage my source how I want too locally....
So, IMHO, git is great and a curse at the same time. Much like AWK and SED where a huge boost to the Unix CLI (if you understand them) git is wonderfully complex and thus frustrating to learn. Git doesn't force you into a configuration management model, but lets you roll your own process. Being flexible is great but git doesn't stop you from shooting yourself in the foot so be careful and know how you want to manage your repo, figure out how to make git do that, document how it's done, and test your process.
Remember, it's the PROCESS you need to have straight in your head. Just googling Git is going to cause you trouble because how THEY use git is unlikely to match how YOU want to use it. You got to know your tools and git is no exception but you REALLY need to know what you are trying to do with git.
Re: (Score:2)
Or you can just use GitHub's Windows client [github.com] which, the last time I used it required me to use the command line to init non Githib repos but then didn't require the user to use the command line for anything. Might even be better now, it's been a couple of years since I had to support software developers running on windows.,
Re: (Score:2)
Re: (Score:2)
For those who are used to any of the older-style centralized revision control systems, it's a huge gear shift to begin using Git. And yes, it seems needlessly complicated, and seems to get in the way of getting things done. However, once you get over the hump and begin to "git" it [tee-hee], it seems very well designed and is very efficient to use.
To git over the hump, you really need to study it somewhere such as Pro Git [git-scm.com]. After that, you need some practice, as well some help from a buddy or two. Soon, i
Re: (Score:2)
After reading TFA, I found that Linus Torvalds made some of the same points, where "a traditional version control system" could be substituted wherever he uses "CVS":
The other big reason people thought git was hard is that git is very different. There are people who used things like CVS for a decade or two, and git is not CVS. Not even close. The concepts are different. The commands are different. Git never even really tried to look like CVS, quite the reverse. And if you've used a CVS-like system for a long time, that makes git appear complicated and needlessly different. People were put off by the odd revision numbers. Why is a git revision not "1.3.1" with nice incrementing numbers like it was in CVS? Why is it that odd scary 40-character HEX number?
But git wasn't "needlessly different." The differences are required. It's just that it made some people really think it was more complicated than it is, because they came from a very different background.
Re: (Score:3)
Oh come on. The hex revision numbers are there because the programmer was too stupid or too lazy to figure out something people could actually use. Typical programmer attitude---code for other nerds, not normal people.
No. git is a distributed version control system, which means that, among other things, operations like "commit" and "merge" that create new commits must operate purely locally, without synchronizing with any remote copy of the repository, and then, much later, when the user decides to push those commits to a remote copy, and other users push their new commits to the same remote copy, the remote copy must be able to tell which of the incoming commits it already had locally, which ones are actually new to it,
Re: (Score:3)
Re: (Score:2)
I used Mercurial for a short time a few years ago. Although I focused above on Git, the same points apply to Mercurial since it's also a distributed version control system. Both use similar concepts, but both are very different from what people who haven't used a distributed version control system are used to. So, it's a huge gear shift to really grok the new concepts of either one. Likewise, it's probably pretty easy to switch between Git and Mercurial since the concepts are similar.
So, the problem wit
Re: (Score:2)
GIT, imho, is no more complicated or confusing than any other scm system. I've used svn, mercurial, and git quite a bit, and found git and hg to be the easiest to work with, with svn coming in a distant 3rd...
Re: (Score:2)
I used SVN casually for a few years, but I can't say I ever fully grasped its approach to branching and tagging, which are done mostly by using a set of specially named directories rather than as a fundamental feature of SVN itself. In contrast, Git's approach to those things make perfect sense to me.
Re: (Score:2)
Wow, I can't believe I'm defending svn....
But as far as I understand (and as far as I've been *using* it for several years now), there are not "specially named directories". There is a user-created convention of directory names and locations..
But underneath, there's NO difference between a tag directory and a branch directory.. (Which _annoys_ me, since I wish I could "lock" tag directories so I don't accidentally check into them, which I think I did once.. then undid of course..)
I guess this is a case of
Re: (Score:2)
I think it is a bit of all of it.
Git isn't for everyone or every project... For some people they are better off with Subversion or something else... Just because their project may have a structure that makes their tool easier to handle.
However I expect, there is a lot of room to make it easier to use, that the end users do not want to embrace, Primarily because they have gotten use to how it is now, and doesn't want to change their methods. But also as a way so they feel good that they are somehow special
Re: (Score:2)
- Centralized repository model, which is simpler and for less technical users makes it less likely that they will screw up. Once something is committed to the SVN server, you can back it up and not worry that you have portions of your data not covered by backups. Plus you get monotonically increasing version numbers, which non-techies find easier to digest.
- Excellent at handling binary files. Like MSOffice files, or LibreOffice, or images, or other binary assets. We have a few r
Re: (Score:2)
What's annoyed me in the past is when I've gone to download some software and rather than giving you a simple link to an archive, you get instructions on how to do it all with Git.
Re: (Score:2)
sure you need to.
like, to install git in the first place.
then there's software that uses GIT to fetch essential pieces of it to itself after you have already installed the software.... that's like double stupid. adding the dependency of git into the software itself.
Re: (Score:2)
Stupid people will always perceive most things as "difficult". That does not mean they are.
Re: (Score:2)
yeah... i love the concept of git.. just not the confusing implementation. I'm never sure if I should use a top-level command or a confusing set of switches to do something basic. I hear mercurial is better in this regard, but I've never used it on a project so I can't say.
Re:And yet, no one understands Git. (Score:4, Insightful)
Use a GUI frontend like SourceTree from Atlassian, there is not much different in Git versus other systems. ... and who is doing stuff like this (besides me) anyway?
The difference only shows when you actually look into the file layout of a git repository
Re:And yet, no one understands Git. (Score:4, Funny)
Its true, git is complex like Linux is - it suits the needs to Torvalds, but I think its popularity exceeds its ability, and many people use it without using it properly - for example a previous company I worked for used git for their SCM and I asked where the backups were I was told they didn't need backups because it was distributed and everyone had a copy of the repo... of course, that relies on everyone having a copy of each repo, or at least 1 other person having an up-to-date copy of each repo which wasn't the case. This kind of thinking wouldn't happen if there was more of a concept of distributed-but-from-a-central-repo. It needs the concept of a golden root from where everything else is sourced (and I know you can have this, but its more convention due to the distributed nature)
Still, it ushered in a new style of version control that wasn't catered for before.
Now we're seeing easier, more accessible systems, such as fossil [fossil-scm.org] by that attempts to bridge the gap between DVCS freedoms and centralised repositories and includes other useful features such as bugtracker in the SCM and still geared towards branches that are more collaborative than gits 'private playground' branches. (ie git is designed for people to work on their own and hopefully merge changes back, many other SCMs are designed for branches that are for common code worked on by several people and thus requiring less merging). Git works well because of how the Linux project is structured - a very large hierarchy, but starts to fall down in a small team where people don't have that arms-length working environment, or where they work on multiple branches at the same time (eg at work, I have my big feature and I have bug fixes that come and go regularly - git doesn't help in that environment unless I have multiple repos checked out)
Re:And yet, no one understands Git. (Score:5, Interesting)
I worked for used git for their SCM and I asked where the backups were I was told they didn't need backups because it was distributed and everyone had a copy of the repo
This is only tangentially-related, but a good story, and it's been a few years since I posted it.
About 20 years ago, I worked for a company which I shall not name, which used CVS as its source repository. All of the developers' home directories were NFS mounted from a central Network Appliance shared storage (Network Appliance was the manufacturer of the NAS device), so everyone worked in and built on that one central storage pool. The CVS repository also lived in that same pool. Surprisingly, this actually worked pretty well, performance-wise.
One of the big advantages touted for this approach was that it meant that there was a single storage system to back up. Backing up the NA device automatically got all of the devs' machines and a bunch more. Cool... as long as it gets done.
One day, the NA disk crashed. I don't know if it was a RAID or what, but whatever the case, it was gone. CVS repo gone. Every single one of 50+ developers' home directories, including their current checkouts of the codebase, gone. Probably 500 person-years of work, gone.
Backups to the rescue! Oops. It turns out that the sysadmin had never tested the backups. His backup script hadn't had permission to recurse into all of the developers' home directories, or into the CVS repo, and had simply skipped everything it couldn't read. 500 person-years of work, really gone.
Almost.
Luckily, we had a major client running an installation of our hardware and software that was an order of magnitude bigger and more complex than any other client. To support this big client, we constantly kept one or two developers on site at their facility on the other side of the country. So those developers could work and debug problems, they had one of our workstations on-site, and of course *that* workstation used local disk. The code on that machine was about a week old, and it was only the tip of the tree, since CVS doesn't keep a local copy of the history, only a single checked-out working tree.
But although we lost the entire history, including all previous tagged releases (there were snapshots of the releases of course... but they were all on the NA box), at least we had an only slightly outdated version of the current source code. The code was imported into a new CVS repo, and we got back to work.
In case you're wondering about the hapless sysadmin, no he wasn't fired. That week. He was given a couple of weeks to get the system back up and running, with good backups. He was called on the carpet and swore on his mother's grave to the CEO that the backups were working. The next day, my boss deleted a file from his home directory and then asked the sysadmin to recover it from backup. The sysadmin was escorted from the building two minutes after he reported that he was unable to recover the file.
Re: (Score:2)
Hehe, strangely enough the company I mentioned also had a sysadmin who thought he knew what he was doing too - one thing I failed to mention was that all the developers work areas was on a single linux server (as he didn't want anyone working on their own linux machines despite everyone having a laptop just to run putty and email). So I guess even if everyone had got a copy of the repositories...
Re: (Score:2)
About 20 years ago, I worked for a company which I shall not name, which used CVS as its source repository. All of the developers' home directories were NFS mounted from a central Network Appliance shared storage
...
One day, the NA disk crashed. I don't know if it was a RAID or what,
It was a NetApp box, so it used RAID 4 (and had more than one disk - the minimum was 2 disks). Perhaps the failure was something more than just a single-disk failure, as a single-disk failure shouldn't have lost the data.
Re: (Score:2)
We've been using Git (with a centralized repo) very successfully with a small team and it has made stu
Re: (Score:2)
Branch per bug? Why not just do the bug fix, and commit it after you've tested the fix? You end up with a ZILLION "pointless" branches after that. (You obviously can know what checkin did the fix in svn or cvs, so you still have the history of what the actual fix was, so can revert or modify it if necessary.)
Re: (Score:2)
What if it takes multiple commits to fix a bug? What if you need to commit to run against a build server? What if you want to switch away to a different branch to work on something else without losing where you're at?
It's one click to delete a branch (and it's a simple checkbox when we merge the pull request using Atlassian's git server product). And you don't have to push your changes out to other users or git servers. You can hold onto it on just your box until you're ready to make it available.
Zillions o
Re: (Score:2)
Why would it take multiple commits to fix a bug? If it's all in one project, I'd *hope* that was all in one commit. (I'm not saying in the real world it works out that way, but it would optimally be so.)
But if "deleting" a branch just hides it from whatever the equivalent of "svn ls BIGANNOYINGURL/branches", then great. (So if it just hides it, can you tell it to tell you the full list?)
a "branch" is just a name pointing to a commit (Score:2)
In git a "branch" is literally a mapping between a name and the commit ID of the commit at the head of the branch. If you've merged your commit into the main development trunk (submitting the bugfix) there is essentially zero overhead to keeping the branch around in your repository.
Some CI systems have a mechanism where you create what you think will be the fix, then push it up to a common area for testing, review, etc. Then you respin your fix based on feedback, send it back in. Rinse, wash, repeat unti
Re: (Score:2)
Branch per bug? Why not just do the bug fix, and commit it after you've tested the fix?
What if it takes multiple commits to fix a bug
I.e., you tested the fix, and committed it, but it wasn't good enough and you needed to do some more fixing?
What if you want to switch away to a different branch to work on something else without losing where you're at?
Separate source trees in separate directories. I occasionally use "git stash", but the problems with that are 1) with too many stack entries or too-old stack entries, I lose context (so I'd be better off doing the work in a separate directory) and 2) on the occasions when I've managed to get my local repository in some weird state where it's not obvious how to fix it, doing my usual "clone another tr
Re: (Score:2)
Sounds to me like you try to make huge complex commits. Try rethinking your work as smaller modular commits. It makes life so much easier to do diffs and handling complex branch/merging behaviors.
And use as many dev branches as you want in Git. You can always cherry pick which changes you want to bring over into your master/release branch.
Re: (Score:2)
Sounds to me like you try to make huge complex commits. Try rethinking your work as smaller modular commits. It makes life so much easier to do diffs and handling complex branch/merging behaviors.
The commits I do are "what's necessary to fix the problem". Perhaps that means that change A depends on change B, which depends on change C, and if none of those changes represent a regression, I do them as separate commits, pushing each one upstream as soon as the commit is done.
But what does that have to do with this "branch early, branch often" stuff I keep hearing from Git fans?
And use as many dev branches as you want in Git.
I do. I don't want to use any dev branches, as they provide no obvious benefit to me, so I don't use any.
You can always cherry pick which changes you want to bring over into your master/release branch.
If I didn't want to
Re: (Score:2)
Well if you don't want to branch, then you're arbitrarily enforcing a condition on yourself that makes things far more difficult then they need to be. Because it is a DVCS, Git it built entirely around the idea of frequent branching. Every time you make a commit you are effectively branching.
Re: (Score:2)
Well if you don't want to branch, then you're arbitrarily enforcing a condition on yourself that makes things far more difficult then they need to be.
If you insist on branching, you're arbitrarily enforcing a condition on yourself.
So why does arbitrarily choosing to work on a branch make things easier? Please give explicit examples of the downside of not explicitly creating branches.
Re: (Score:2)
Without branching, you can only have branch-like behavior by having multiple checkouts. And when you go to resolve those (at least in Git) you will still be doing a merge operation that is identical to merging a branch.
When you have multiple people touching the same project, branching helps keep people's work separated so they aren't tripping over each other, and merging provides a place for reviewing and synchronizing changes across different efforts.
Event CVS and SVN have branching because it is useful. S
Re: (Score:2)
What if you want to switch away to a different branch to work on something else without losing where you're at?
Then I will check out a new copy - disk space is cheap and my time wasted waiting for a build when I switch back again is expensive.
Re: (Score:2)
In Git, every time you check out a new copy you are getting the ENTIRE project history, not just the specific commit. That's part of the nature of a DVCS.
Hence why branching is built to be so easy, and why switching branches is effectively just essentially just changing a symlink.
If you want to be doing dev in another instance thing while a build is running, that's a good argument for a second checkout. But multiple checkouts just to avoid branching is not a good way to use Git, not a good argument against
Re: (Score:2)
branching and merging are monolithic tasks that are very cumbersome
Rubbish. In SVN you can branch, and switch your working copy to the branch in a single command-line call. With the advantage that the branch exists in the central server (yes, this is an advantage) right away so other people you work with can work on it too.
it's highly encouraged and the process is almost trivial by comparison.
The cost of branching is not related to how easy the tool makes it to create a branch. Contrary to common belief, it's equally easy in both SVN and git to create a branch. The cost of branching is equal to the cost of merging those branches together. Git
Re: (Score:2)
But multiple checkouts just to avoid branching is not a good way to use Git, not a good argument against it.
Sorry, I forgot to address this. I'm not suggesting multiple checkouts to avoid branching, I'm suggesting multiple checkouts when working on multiple branches to avoid rebuilding when you switch from one to another.
Re: (Score:2)
Either: https://www.atlassian.com/soft... [atlassian.com]
or: https://code.google.com/p/tort... [google.com]
But I don't like SCMs that integrate into the Explorer ... to confusing and error prone IMHO.
Just worked an hour on my sisters Windows 8 Explorer/Internet Explorer and stuff: worst software/UI experience ever ... who actually is using such a system? Masochists?
Re: (Score:2)
I forgot tot mention that IDEs like Eclipse and IntelliJ have a quite good build in Gt support.
Re: (Score:2)
I use Git for Windows [github.io] - it's pretty simple, but does everything you need, adds itself into Explorer so you have all the options right there in context menus. It also has a bash shell environment.
Like Coca Cola, git is the real thing (Score:5, Interesting)
As a software developer who's been a git user for 7 years, I don't know how I could have written any serious code without git. Branching and merging is trivial. Cloning is trivial. The staging area makes choosing what to commit trivial. git rebase makes life much easier when it comes to reordering/editing/removing commits out of the history. git blame --- such a nice tool. Binary searching to find bugs is trivial. Every git tool is documented to within an inch of its life.
And the icing on the cake? Code cowboy [wikipedia.org] hates git. Like sunlight or garlic to a vampire, Code cowboy abhors git. He can't hold the source code hostage to his every brain damaged whim. He can't hose anybody with a distributed version control system. It's no wonder why Code Cowboy is always yapping away at git -- he can't show off his genius if his code can be ignored.
Re: (Score:2)
As End User most of the time (I rarely diddle the code, I'm not that good at it, though I do occasionally fix things) I am kind of grumpy about git. Nobody tells you to use --depth 1 or however you do that, luckily it's been a while since I've downloaded any large sources for which I wasn't able to get a simple tarball. The inability to resume a fetch is pretty horrible, though. Unless that's been fixed recently?
Re: (Score:2)
I wouldn't bother with --depth options, at that point you're better off downloading a tarball/zip of the branch. Downloading a nightly snapshot tarball is even better, because you can resume that.
Re: (Score:2)
I wouldn't bother with --depth options, at that point you're better off downloading a tarball/zip of the branch.
I agree, but with the caveat that I occasionally run into someone using git on their own server and without providing a tarball, in which case woe is me.
Re: (Score:2)
As a software developer who's been a git user for 7 years, I don't know how I could have written any serious code without git.
Very much this. Git has a steep initial learning curve. The concept of a branch being just a pointer is foreign at first. New users try to fit the concept of a branch into their pre-existing notion that it's the sum of everything that has changed since the last merge.
But once you really understand how Git works, you're ruined for every other version control system. When I'm forced to use TFS for a project, I use Git locally and Git-TFS to keep them in sync. Now I commit often, all day long, tracking all my
Re: (Score:2)
Yup. I can deal with any language (ok, aside PHP...), any operating system (yeah, I don't mind developing on Windows), any framework, any technology...but source control has to be on git o
Re: (Score:2)
I write serious code all the time without git. In other tools it was easier to avoid branching or merging by keeping the teams small and only track a "dev" branch and several release branches that are rarely updated. Apply the same patch to each release branch to avoid having to do any complicated merges between branchs. Yes it's all kind of silly and painful, but it doesn't take a long time if you avoid the weakness in other tools. Plenty of time left over to write "serious code".
The easiest of course is t
Re: (Score:2)
Re: (Score:2)
Well you can share it on the same system or over a network filesystem that is designed to do file locking in a unix friendly way (like NFS).
And I totally agree with other posters that RCS for /etc is a great way to go. I use it myself. (but I keep my DNS zone files in git)
Re: (Score:2)
Yup - I always have a RCS folder in /etc for example.
These days I use git for that, too.
Re: (Score:2)
git pull --rebase origin master
There might possibly be no other command in the history of software development that has saved more man-hours than this gem.
Re: (Score:2)
Except when you forget the --rebase and now have hours of work fixing your tree.
Especially if you provide your work as a bunch of patches against an official (but read-only) repo (because said repo is like AOSP where it's easily 30+GB).
git's ability to generate working patches that apply cleanly breaks if you branched somewhere along the line, then merged
Re: (Score:2)
Any merge conflict and you'll notice something fast what happened, and then you can simply abort. If someone there's no conflict, you can just look at the reflog and reset to the pre-merge commit.
Whoop-y-doo.
Re: (Score:2)
After using Git for about a year now, my conclusion is that subversion is good enough for your team, and heaven compared to Git. With subversion you can just peform an update without having to wonder if you might have something that still needs to be commited. I am also not convinced that creating branches and merging all the time is realy a good way of working for the team we are working in.
Re: (Score:2)
Because you shouldn't do anything without knowing what you're doing. That command is just unique-ish to git, so it requires a bit of special attention (you need to understand how the commit hashes work).
Once you do though, merge conflicts are 100x easier to handle, commit history makes more sense, etc. There's cases where you don't want to use it (when you want to be able to trace branching hist
"don't use rebase" only applies in some cases (Score:2)
The rule against using rebase really only applies if you are publishing your git repo (and specifically the branch in question) to other people.
The reason for the rule is that if you rebase your changes on top of the latest upstream, anyone pulling in your branch is then forced to rebase as well since you've essentially rewritten history. (Doing a rebase changes the hashes on all your local commits.) If you instead merge upstream work onto your local branch then your history is preserved and everyone downs
Re: (Score:2)
I prefer separate pull/rebase steps (Score:2)
I *never* do development on an upstream branch. So instead of the above I would always checkout the local "master" branch, do a "git pull", then checkout my development branch and rebase my work on top of the latest local "master" branch.
The nice thing about this is that the local "master" branch is always identical to some version of the upstream "master" branch, I never need to worry about it getting polluted with my development work.
Re: (Score:2)
There is a difference between Serious Code and Distributed code.
You could write serious code without any sort of Source Control... However it isn't recommended.
But sometimes having a small term working a program is much better then having hundreds of people. So for the smaller teams GIT is too cumbersome.
Re: (Score:2)
All small teams I worked with the last 3 years love git.
What is cumbersome at git, don't get it?
The daily work cycle is exactly the same as in CVS e.g.
Everyone simply does a commit with push and optional rebase, unless you have to merge this is a single command, usually triggered via the GUI.
At some point your team is done, someone merges the current branch to "the trunc" and makes a new branch for the next sprint or story/feature. Something similar you do in CVS as well, but much much later when you have a
Let's not forget Mercurial (Score:4, Informative)
Let's not forget the other contender for replacing Bitkeeper: Mercurial [iu.edu]. We will also be celebrating its 10th year anniversary next week during the Pycon sprints [selenic.com].
Re: (Score:2)
I like mercurial a lot, but there is nothing quite like github. Bitbucket isn't awful, but it is no github. Given the choice, I'd say that mercurial has a better way of doing things, and is much easier to learn how to use [hginit.com]. Anyone who knows how to use git, basically knows how to use merucrial, anyone familiar with cvs/subversion should have little trouble figuring it out, and someone who has never used it will find it much more pleasant than git....but with
this is really a story about.. (Score:5, Insightful)
how bitkeeper fucked up and was swiftly relegated to irrelevance... you have to wonder how many of these [bitkeeper.com] are even still using bk......
Re: (Score:2)
Exactly, BitKeeper committed suicide by throwing a fit over their licensing for open source projects, the terms of which stipulated that copies of all commit messages must be sent to BitKeeper, and one of the kernel devs figured out (basically, IIRC) a way to circumvent that.
At the time of the fiasco that caused git to be created, the top two OSS projects (by lines of code) using BK were the Kernel and MySQL (the third was a PHP CMS that I was part of at the time). There used to be a OSS projects page with
Re: (Score:2)
I'm thinking IBM doesn't use their license anymore. AFIK IBM was only using Bitkeeper for the Linux kernel. Larry made them pay for a license since IBM has it's own competing SCM and the free version banned use by any company that has a competing SCM.
Udacity class on Git and GitHub (Score:2)
Udacity has a free class [udacity.com] on Git and GitHub. I recommend it. They spend a little too much time on writing a chart that diagrams the different parts of Git, but the class is well-structured and clear.
Git still uses SHA1 for signed tags (Score:2)
This is a security failing that is hard to overlook for projects with far-flung participants. Any time data is downloaded it could be subjected to MITM attack.
Core git coders appear oblivious to the problem. Even so, how hard can it be to replace SHA1 with SHA256?
Git is its own worst enemy (Score:4, Insightful)
Git is its own worst enemy
Sigh... Git. Ten years later, and it's still making people suffer with its unforgivably awful user interface. Seriously. I like the command line, and git is my primary version control system, but git's UI is the single most user-hostile example of human-computer interaction that I have had the misfortune to encounter in years. Maybe decades.
Git's command structure is a train wreck of inconsistencies, some of its most important terminology is worse than worthless, and its man pages and built-in help text are idiotically obtuse. I have been following its development closely enough to understand how it got this way. A lot of it has to do with placeholder terms that were never updated, synonyms that were never reconciled, features that were grafted onto existing commands and never properly organized, and its origin as a set of low-level components rather than a tool intended for humans. In other words, a pattern of evolution much like any other software, except for one thing: Even after years of being relatively stable, its mantainers still haven't addressed its glaring usability problems.
These aren't just minor warts that only affect a few people, either. There are countless articles, blog posts, and forum threads expressing frustration with git and detailing specific improvements that could transform it from a usability nightmare to an elegant piece of work. Sadly, the maintainers either ignore them or respond with some half-witted reason to resist change. Frankly, I am embarrassed to see my fellow software developers failing so miserably to recognize the importance of usability, and failing to fix it.
Newcomers shouldn't have to be encouraged to "take the time to learn git." It should be easy. A programmer familiar with version control systems should be able to pick up a new one in five minutes, and find the answer to most intermediate-to-advanced problems in maybe ten or fifteen. They should be able to walk away for a month or two, come back, and still remember how to use it. That doesn't generally happen with git. One has to invest quite a bit of time and patience to confidently use anything beyond its most basic operations without screwing something up, and stay in practice with it, or else end up having to learn most of it all over again.
The ridiculous thing is that it doesn't have to be this way. Mercurial is real-world proof of that.
I hate git for these reasons. It's a cantankerous bastard of a tool that will just as soon kneecap you as handle your data. I only use it because of github (which is brilliant, by the way.) If you want to see an example of how version control should be done, get to know mercurial. Its internal de
Re: (Score:2)
To anyone curious about Mercurial enough to try it, keep in mind that what git calls a "branch" is called a "bookmark" in mercurial, because "branch" has a more traditional meaning over there.
Re: (Score:3)
I think you missed the part where one developer reverese engineered how the protocol worked and the developer had enough of a shit fit that it became apparent that continuing to use their software was going to be problematic AND it was already the case that many people didn't want to use it for issues of licensing.
Even so, nobody is under any obligation to keep using a tool someone else makes, even if they like it. He put in the work. Nobody has some right to have others continue to use a service that they
Re: (Score:3, Informative)
Also, Git is and was an improvement over BitKeeper from a purely technical standpoint. Merging was easier, particularly with file renames. And Git was more performant. Here's a contemporaneous comparison from 2005, only one month after Git was publicly released:
http://www.selenic.com/pipermail/mercurial/2005-May/000334.html
BitKeeper sucked compared to both Git and Mercurial at the time. BitKeeper was definitely an improvement when it came out, but it was quickly surpassed by the open source alternatives.
Re:The real story (Score:4, Informative)
It's worse than that. Linus would tell everyone not to worry and go on about how Bitkeeper was a great improvement and Larry would prove him wrong by throwing public tantrums and generally playing stupid licensing games. Ex banning IBM from using the free version since they had a competing SCM being built by another (far removed) department. Banning anyone who worked directly on a competing SCM from using Bitkeeper at all. And responding to said developer reverse engineering one of the export interfaces by discontinuing the free version of Bitkeeper.
The best part of it all was that Linus helped him design the thing in the first place.
Re: (Score:2)
Her name is Julie Ann Horvath, and she was at github not git.
She went to a company called &yet and then left a while after apparently to strike out on her own. AFAIKS she doesn't have any clie nts though.
Make of that what you will.
Re: (Score:2)
To be fair, I remember losing a day's worth of work when I started using CVS. It taught me an important lesson - archive the whole local tree before I try doing something for the first time. I think I thought that I committed all the work successfully, then decided to pull a branch, didn't read the message properly and overwrote all the uncommitted work - fuck me was I pissed off.
I also set up a couple of test projects when I started using Git, and played around with branching, tagging, merging, etc and tes
Re: (Score:2, Informative)
That's not correct. McVoy pulled the free-licensed version of BitKeeper (which Linus and OSDL were using) because of Tridge's work on a compatible client, and refused to sell a BK license to OSDL because they had allegedly broken the terms of the free license. This despite the fact that Tridge was an OSDL contractor, not an employee