Fossil Versus Git
fossil-scm.org
fossil-scm.org
This is FUD. Git never erases history; it merely moves mutable refs around. When you rebase a branch called "master", nothing is rewritten: a new immutable commit history is created, and the ref "master" is moved from pointing at the old history to pointing at the new history. The old history still exists in all its glory at "master@{0}". (And when you change that, it goes to master@{1}, and so on.)
If git didn't have the concept of refs, then this would never even worry anyone. Once you have commit ab387df, it's refers to the same sequence of changes for all eternity. What master points to may change out from under you, but the history never goes anywhere.
The only way to "rewrite history" is to delete every copy of the repository ever made, which is exactly how you would rewrite history with Fossil or Subversion or anything.
(And now, if I may, a digression. I've noticed that the "rewriting history" aspect of Git makes for a good personality test. It's strongly polarizing -- the people that think source control is designed to be documentation love it, and the people that think source control is an audit mechanism hate it. Control freaks hate git, and long-haired hippies seem to love it.)
I don't use rebase and I can't say that I like it, but that doesn't make me hate git. I commit all my crappy and stupid intermediate code (for my personal projects).
When you keep the change history clean, it's a lot easier to answer questions like "why did I do that?", and it's a lot easier to explore topic branches and back out bad design ideas.
If the history is messy, removing bad changes is about as difficult as opening up every file and removing the changes you don't want. In other words -- error prone.
I have been using it to write extended tutorials on my local system. I may find a bug at step 45 that needs to be fixed back at step 2. I am pretty sure that git was never designed for me to do this, but it can be done pretty safely, in a way that I can recover from.
Now, is this method of going back and fixing things in the past a good idea for general software development? Absolutely not! If I wrote a bug in march, it serves the team rather poorly to go back and replace every commit in the master branch with a new one that doesn't have the bug. And that's why I feel it's accurate to call it rewriting - sure, git keeps enough data around for you to recover from any boneheaded edit you may make to a branch, but from the perspective of a teammate you're still going back and modifying history. It's still confusing. You're still creating new commits out of their commits that have the same name, but different contents.
That's the kind of tool that git is.
Scenario #1:
I'm working on a feature branch. I have a number of discrete changes
that I'm making. I attempt to keep each of these changes in its own
separate commit. After completing 10 such changes, I realize that I
introduced a bug in change 3. I commit the bugfix with the same
commit message title as change 3, but with a "squash!" prefixed at
the front of it. Now when I'm finished with my changes on the
feature branch I can run "git rebase -i". git-rebase will
automatically position the bugfix to change 3 next to change 3 and
set it up to be squashed into the change 3 commit. Then when I merge
my changes into master there are only commits for changes 1-12,
instead of 50 commits covering all of the minor bugs that I fixed
with my undeployed code.
Scenario #2: Rewriting commit messages. This is one that I use all of the time at
work. I use a commit message template that has "Reviewed-by: ???" at
the bottom. When I do all of be topic branch development, I don't
get someone to review each individual commit prior to commiting it
(as that would defeat the purpose of a DVCS... might as well go back
to SVN at that point and managing chunks of changes prior to commits
with something like `quilt`). So now all of my commit messages have
"Reviewed-by: ???" on them. Prior to merging the changes back into
master, I can use git-rebase or git-filter-branch to go back and
edit my history to change "Reviewed-by: ???" to "Reviewed-by: Bob"
on my commit messages.Anecdote:
I fucked up some commits. I put in wrong conmiter names and so on, omitted some data in some of my commits. With git I could clone my repo, experiment with rewriting commits to fix conmiter names, and then merge it to everything. Yes history is changed, but end of the day this is not about hiding shit. This is about keeping the repo information useful and simple. If you want to blame shit on people, there are external systems which will ensure that people will get blamed for their own shit. VCS is not for that, VCS is to version your code, be able to un-fuck yourself up, and figure out why someone did something and how they did it exactly at some point in time. Nowhere in the is "blame people for mistakes" seen.
I've seen people not want to get blamed or use VCS. They used a word document to version their source. Yes. And I assure you it took people lots of time to realize wtf is going on.
However, shit like this makes me stop reading:
"Git has a huge user community. If following the herd and being like everybody else is important to you, then you should choose Git."
If you know git you can contribute to any project on github more easily. That is an advantage, though it would be utterly foolish to make your choice solely on this point.
They try to say that your voice will be comparatively louder and you'll get more attention from the developers, but in a large community, you get attention from the community as well. The only thing you can get from using an unpopular project is an adrenaline rush from living on the edge.
Also I don't think "lack of rebase" is a feature. If you don't want it in git, just forbid using it for your project. However, if you want to maintain a patch-set outside of a project it's the best thing since sliced bread.
One day, I tried hg by chance and discovered it was as fast as git and as sensible as bar :( Now I have no idea what to use.
The poem isn't actually in praise of making unusual choices — it's about rationalizing the choices we make so that they seem more intelligent and important than they actually were. In the text of the poem, the narrator goes to great lengths to make it clear that he can't tell any difference between the paths in front of him. So he decides to choose one arbitrarily, and tells us that years from now, he'll tell people that he took this little-traveled road and that set the course of his life.
My reading of the last stanza differs from yours: he's not saying that he'll tell people, falsely, that it set the course of his life; he's saying that although he couldn't see any good reason for choosing one over the other, as his life goes on it'll turn out that it made a big difference.
The thing that intrigues me about this poem (which, actually, I don't much care for despite its fame) is the title. "The road not taken". That's not the perhaps-less-worn path he did take, it's the other one. Without that title, if you asked me which path was more the subject of the poem I'd have said without hesitation: the one he took, which "has made all the difference". But no: the spotlight is on that sigh with which Frost will be telling the story, the regret (if that's the right word) that he couldn't try them both. I think.
I agree with you on the title though. It puts a really nice spin on the poem.
TWO roads diverged in a yellow wood, ...
[Road "First", aka "Scary Road"]
And looked down one ... To where it bent in the undergrowth; ...
[Road "Other", aka "Happy Road"]
Then took the Other, as just as fair,
And having perhaps the better claim, ...
Oh, I kept the First for another day!
In other words, "I didn't take the First road; I took the Other road."Substituting, this brings us to, "I didn't take the Scary Road; I took the Happy Road."
Then, the key is...
Though as for that the passing there
Had worn them really about the same, ...
This means "both roads were equally traveled". So therefore we must extrapolate into the future. Take a thousand average people. Not entrepreneurs; think more along the lines of Grandma. Now show them a Scary road and a Happy road, then ask them to choose. Which one are they more likely to select?I'd say the Scary road is the one "less traveled".
I shall be telling this with a sigh, ...
Why would he sigh if he were not lying? Two roads diverged in a wood, and I—
I took the one less traveled by
This means he claimed to have taken the "less traveled" road, which is the Scary road. But he took the Happy road.Therefore, the poem is about a lie.
As for "Why would he sigh if he were not lying?", I hardly know what to say: what do sighing and lying have to do with one another? He expects to feel some regret, some sense of a missed opportunity, at never finding out what was down the path he didn't take. At least, that's my reading and it has the advantage that regret does sometimes make people sigh, whereas lying doesn't.
If both roads are just as fair as each other, there isn't one scary one and one happy one, there's either two scary ones or (more likely) two happy ones.
Anyway, shouldn't it be ONE road diverged in a yellow wood? If TWO roads diverged, that would make four.
The poem is about a man who, "years and years hence", will be remembering his life, and up there near the top of his memories to tell people about is how he chose which of two almost identical paths he took when walking in a wood, once, and they were roughly the same. Does that sound like the sort of memory someone who would pick a scary road would choose to reminisce about? Does it sound like the sort of tale a habitual liar would tell? No to both. It sounds like the sort of tale a really boring person with no interesting memories would tell.
He was walking through a wood, not trying to get anywhere in particular and not caring where he went. It was probably quite pleasant, and it wasn't the hundred acre wood or the Lord of the Rings evil forest, both roads came out the other side of the wood and then he went home.
Instead, explore the other documentation on the site and see whether it's an SCM for you.
Zed Shaw wrote a perfectly reasonable post about why he uses it:
http://sheddingbikes.com/posts/1276624594.html
Discussion: http://news.ycombinator.com/item?id=1433387
ruin:~$ date -r 1276624594
Tue Jun 15 13:56:34 EDT 2010Am I the only one who's actively suspicious about this kind of thing? With Git, I can use whatever wiki, ticketing, documentation, and blog features I want. I don't want my VCS to be a Lotus Notes for software development.
I believe it's JRuby-based.
Not that it's difficult (it is) but it is a complete waste of people's time. If I want to fiddle with every aspect of my development tools, maybe I'm not Fossil's target.
Next time I need to set a small coding project (I attend a few OSS hackfests every year), I'll definitely consider Fossil instead of git.
No, I just use GitHub. Is there a hosted Fossil service that's as easy to use?
And I don't know if there's any hosted Fossil service around, easy to use or otherwise.
I have not tried it yet, however, and have no idea how easy it is to use.
Yes! :'(
Complicated to set up and complicated to maintain. And its black box approach to storing the repositories on disk - using UUIDs as folder names, doesn't inspire confidence if the complicated card house should fall over.
I'm not saying Gitorious is a house of cards, but it didn't fit the bill for me at all as a person with limited time to fiddle with a source control setup but still want some self hosted repos. Gitolite ftw.
I'd also be suspicious of the integrated features of Fossil, which from a quick look on their site wouldn't be enough to cover what I need anyway. I'd be curious to know what the thought behind integrating everything is. Could be handy for a hackathon or such I suppose?
That's exactly the scenario I had in mind. I have attended some hack fests myself and, besides the general chaos and lack of coordination, there's the particular issue of how people share code, report issues and write stuff down. Everything is everywhere. It's a mess.
Wiki - check
Ticketing & Bug Tracking - Github has 'issues'
Embedded documentation - include a README file in your repo, and Github immediately shows that under your project
News/Blog features - Github has pages, and automatically generates RSS feeds for your commits.
I'd argue that Github does all these things better than Fossil (or I) can ever do - they have a whole design team constantly worrying about ease-of-use.
Most developers I know are already paying for hosting already -- for pet project sites, personal sites for self/friends/family, for running proxies or experiments, hosting offsite backups, etc. etc..
And further down in the same section, it sounds like the author has confused Git itself, with the way Git is used developing the Linux kernel. Just because the Linux kernel devs use Git in a particular way doesn't mean Git encourages any one particular model over another.
Does anyone know of a more technically accurate and less biased comparison?
That was my immediate reaction, but I realized that there is a third thing. In a way, a git-like DVCS in most workflows still retains some of its 'centralized' state - that is, some repositories are the only repositories with certain branches etc. and often there is a specific repository on a server that has all branches "that matter" (such as a github account). As mentioned, Kernel developers need this to reduce clutter/noise and establish arbitrary hierarchies (that are, in a sense, centralized).
This "third thing" is, in a way, even more decentralized than old-school CVS/SVN- in that all repositories truly become equal. I'm not saying it's better than git-style-DVCS- it's certainly not if you need an ad-hoc high branch-volume hierarchy- but I do think that it's an underdeveloped use-case that's neither centralized nor adhoc distributed that might (maybe not as Fossil per se) be very useful to many workflows.
Put another way- how often do git workflows have you push/pull from multiple remotes when you're ready to deploy (or at all)? In the vast majority of workflows that I've seen and used you generally have one authoritative remote. Something like Fossil would make it so that a push/pull to any remote is effectively the same thing.
I'm not massive into the unix philsophy, but this seems like bloated: they should be separate things, even if they're interconnected imo.
I've stayed away from fossil as an SCM because it doesn't have the traction that others do (I personally prefer mercurial), but I have used it a few times where I needed a wiki and bug tracker, setup is about as simple as you can get.
It's not as if rebase is commonly used. It's there for those rare instances when you, say, remove a file that it turns out you don't have the copyright for and need to purge it completely, or that huge binary file some newb (ok, it was me) committed a while back that's not needed and makes cloning take 10 minutes.
Fossil looks really exciting to me- I've used git a ton and like it but don't really delude myself into thinking it can't be disrupted. But, seriously, you're missing a critical feature; instead of trying to patronize your would-be future users by defensively stating that it's a "good thing and we're proud of this missing functionality"- you could simply state something along the lines of "In general we think not having the equivalent of rebase is a good thing, but should you seriously need something like it, this is opensource and we'd love for you to contribute..." etc.
[Edit: I'm referring to git-filter-branch etc. to remove those things, not the rebase command per se, but in context of the original page's "Immutable==good" argument I interchanged the two]
It's not as if rebase is commonly used.
This is widly incorrect. Powerusers of Git use rebase extensively, pretty much every patch that makes it into Git itself has been rebased at least half a dozen times.I rewrite my history constantly, because when writing code I commit all the time, then I squash commits together later and give them proper commit messages.
I wouldn't use any SCM tool that wouldn't give me this functionality. The result of recording all history permanently is that users will just not commit their incomplete work, meaning that it'll be in their working tree instead of tracked in some form by the repository.
> Fossil deliberately avoids rewriting history. Fossil strives to follow the accountants philosophy of never erasing anything. Mistakes are fixed by entering a correction, with an explanation of why the correction is needed. This can make the history of a project messy, but it also makes it more honest.
I'm not sure how keeping garbage like "oops, fix typo" out of history is lying to your fellow developers-- a VCS should be aiding development, not forcing others to see your little mistakes.
In fossil, there is such a thing as a private branch that will not be pushed/pulled when repos sync w/ ea. other, but the owner of that private branch can ultimately merge the work, and it will appear as a single atomic commit (ie: a single checkin, not all the multiple artifacts describing the whole of the work in the private branch). I'd think that's the closest thing to rebase that fossil has. Even in that case, though, there's no explicit moving of artifacts; when the work is merged to a public branch though, all the work appears as the condensed net change, in a single checkin.
Otherwise, culturally speaking, re-working of the tree is -not- the way the repository is handled. Errors are fixed w/ corrective checkins, and both will show in the history.
jrockway sheds some light on git rebasing here (http://news.ycombinator.com/item?id=2524993) though, which I'll look into myself to come to understand. Before, I thought rebase was more 'destructive' than what that description indicates.
It's really a magnificent tool because I never have to worry about the cleanness of my work-in-progress commits.
"I suppose my biggest concern with Fossil and NetBSD is how Fossil might scale. We use Fossil on projects with a 1GB or larger check-out and with thousands and thousands of files. But I didn't really design fossil for truly huge projects."
seems to me both systems have a method of choosing what to commit, in git you can choose to stash or stage, in the others you can only stash since they "don't have a staging area". git++ for having both options.
Use case: A commit should only do one thing at a time, but sometimes I'm not as organized. I like to do a whole mess of work and when I'm ready to commit it, I use git add --patch to separate out unrelated bits of work into separate commits--even if separate bits of work end up in the same file. It's amazing how much a load off your mind this is--you don't have to be quite as OCD while you're coding if you're a little fastidious about your commits later on.
No point in having different projects using multiple version control systems.
I use Git when I'm releasing binaries to people (because I like its tagging better) or when I have to track some upstream code and merge in some local changes.
Too bad tarpit.com is taken :(