News for hackers. Stuff that matters.
Re:Is Git Irreplaceable? (2019) by tasuki on Tuesday January 07, 2020 @03:37AM (#21978145)
> I worry that Git might be the last mass-market DVCS within my lifetime.

The possibility of git being the last mass-market DVCS within my lifetime leaves me with warm fuzzy feelings. Git is simple and elegant, though its interface might not be.

Re:Is Git Irreplaceable? (2019) by alkonaut on Tuesday January 07, 2020 @04:30AM (#21978379)
I think it's simple and elegant as a data structure, when what people need and want is something that is (at least also) simple and elegant in its UX and most importantly VERY simple and elegant for the 80/20 use cases.

For example a typical question on Stackoverflow is "How do I answer which branch this branch was created from", always has 10 smug answers saying "You can't because git doesn't really track that, branches are references to commits, and what about a) a detatched head? b) what if you based it off an intermediate branch and that branch is deleted? c) what if...

5 more answers go on to say "just use this alias!" [answer continues with a 200 character zsh alias that anyone on windows, the most common desktop OS, has no idea what to do with].

I don't want to write aliases. I usually don't want to consider the edge cases. If I have 2 long lived branches version-1.0 and master. I want to know whether my feature branch is based on master or version-1.0 and it's an absolute shitshow. Yes it's possible, but is it simple? Is it elegant? No.

The 80/20 (or 99/1) use case is

- centralized workflow.

- "blessed" branches like master and long lived feature branches that should ALWAYS show up as more important in hisory graphs.

- short lived branches like feature branches that should always show up as side tracks in history graphs.

Try to explain to an svn user why the git history for master looks like a zigzag spiderweb just because you merged a few times between master and a few feature branches. Not a single tool I know does a nice straight (svn style swimlane) history graph because it doesn't consider branch importance, when it should be pretty simple to implement simply by configuring what set of branches are "important".

Re:Is Git Irreplaceable? (2019) by Ntrails on Tuesday January 07, 2020 @08:13AM (#21979597)
As a very basic git user, about once a month my local git repository will get into a state I cannot fix. I cannot revert, cannot reset, cannot make it just fucking be the same as origin/master. Usually I accidentally committed to local master and then did a couple other things and it's just easier to blat and re-clone than work out how to resolve.

Git is hard for idiots imo, and there are a lot of us

Re:Is Git Irreplaceable? (2019) by rjsw on Tuesday January 07, 2020 @09:33AM (#21980209)
The workflow that I have found works best is to just not change anything myself, I let other people do all the work. This way I can be sure that I won't get merge conflicts that I can't fix.
Re:Is Git Irreplaceable? (2019) by vvillena on Tuesday January 07, 2020 @09:06AM (#21979970)
> Usually I accidentally committed to local master and then did a couple other things

Create a new branch and check it out while you are on the last commit (git checkout -b my-branch), delete the master branch (git branch -D master), and pull it again (git pull -u origin master). You'll end up with a local branch with a bunch of commits that you can merge, rebase or cherrypick, depending on what you want.

If you want to learn more about git in a practical way, there's an awesome book called Git Recipes.

Re:Is Git Irreplaceable? (2019) by brigandish on Tuesday January 07, 2020 @09:29AM (#21980173)
That is not easier than "blat and re-clone" so I think you're proving their point.
Re:Is Git Irreplaceable? (2019) by vvillena on Tuesday January 07, 2020 @12:54PM (#21982514)
Recloning means redoing your work on top of a potentially different codebase. The approach I described is how you "blat and reclone" using git instead of the filesystem, and it has the clear advantage of keeping everything in the same repo. You can then mix all the code together in whatever way you prefer.

Git is a very flexible tool that allows for individual local workflows independent of how teams collaborate. Finding a personal workflow that works for you is a little investment that pays huge dividends for a long time. Git is a 15 year old tool that is expected to live for 10-30 years more at the very least. I encourage everyone to learn enough Git to not be afraid of it.

Re:Is Git Irreplaceable? (2019) by munmaek on Tuesday January 07, 2020 @09:43AM (#21980299)
If you’re just going to blat and reclone, then you may as well use a folder system instead of git.

I see no reason git needs to be changed in order to cater to people who refuse to read basic documentation or learn from their mistakes.

Re:Is Git Irreplaceable? (2019) by mannykannot on Tuesday January 07, 2020 @10:33AM (#21980871)
I did not read brigandish's comment as advocacy of 'blat and reclone', I took it to be a comment on git's awkwardness.

I have considerable sympathy for the RTFM reply, but I do not think it is the last word that shuts down any question of usability. What seems clear to me is that there are a lot of people using git who probably should not be. In many cases, they do not have a choice, but I also suspect that many of the organizations that have chosen git do not have the issues that it is optimized for.

Re:Is Git Irreplaceable? (2019) by brigandish on Tuesday January 07, 2020 @10:44AM (#21981007)
> I see no reason git needs to be changed in order to cater to people who refuse to read basic documentation or learn from their mistakes.

In my opinion, solving problems and making improvements involves reducing complexity, not defending it. Many people, including myself, have read the Git docs and learnt about the underlying data structures etc etc and still we can make the claim that it could be better, in numerous ways.

Calling everyone feckless won't invalidate that.

Re:Is Git Irreplaceable? (2019) by munmaek on Tuesday January 07, 2020 @11:34AM (#21981503)
> we can make the claim that it could be better

I’m not disputing this. Of course git isn’t perfect.

What I’m against is changing git to cater to people who can’t read the manual and make basic mistakes.

Re:Is Git Irreplaceable? (2019) by antris on Thursday January 09, 2020 @07:57PM (#22007551)
> What I’m against is changing git to cater to people who can’t read the manual and make basic mistakes.

Why? Isn't software that doesn't require reading a manual and doesn't let the user make irreversible mistakes considered good design?

Re:Is Git Irreplaceable? (2019) by munmaek on Thursday January 09, 2020 @08:36PM (#22007731)
Not if it means reducing capabilities of the program in order to add bumper guards.

I can’t think of any software that handles a complex program that doesn’t have a manual, documentation like a manual, or a learning curve. Git is a tool for developers, not casual users who want typical apps.

Again, you wouldn’t make an argument like this for a tool used by a plumber or a mechanic. If a tool succinctly handles a problem, good! But using tools is part of the profession; they have learning curves.

Most issues with git are PEBKAC issues because people refuse to spend 10 minutes of their life reading about a tool they may use for hundreds or thousands of hours. I wouldn’t want to cater to those kinds of people.

Re:Is Git Irreplaceable? (2019) by antris on Friday January 10, 2020 @04:05AM (#22009529)
Software can cater to multiple types of uses at the same time. You can have a learn-as-you-go experience while keeping your powerful tools that enable more fine-tuned or complex tasks. Easy-to-use vs. powerful is a false dichotomy.

About the plumbing/mechanic analogy, I totally would make the same case! Hammers and wrenches don't require a manual and can be used for very complex tasks, and that's exactly what makes them so well designed and popular. Few people want their hammer to have more features, and if they do, they still want to keep the good old hammer ready, because it's so easy and simple to use.

Especially calling out PEBKAC (Problem Exists Between Keyboard And Computer) - while even most of the expert git users, including the author himself say the interface could at least be made much better - makes me really suspicious that you simply like feeling superior to other people because you know something they don't, and you don't want to lose your "edge" if suddenly everyone can use version control without resorting to manuals.

Re:Is Git Irreplaceable? (2019) by munmaek on Friday January 10, 2020 @09:10AM (#22010987)
> Easy-to-use vs. powerful is a false dichotomy.

iMovie vs Premiere/Final Cut. Final Cut X vs 7. Garageband vs Pro Tools. Word vs LaTeX. and so on. It's very difficult to design interfaces that are easy enough for average users that don't impede pros/power users.

> hammer

A hammer isn't a good comparison. Something like a multimeter is what I was thinking of, etc. Git solves a significantly more complex problem than either of these, though.

> including the author himself say the interface could at least be made much better

I don't disagree! Git's interface -could- be better. That has nothing to do with my points above with regards to people refusing to read basic literature about the tools they use, expecting them to just magically do everything for them out of the box, "intuitively".

> feeling superior ... you don't want to lose your "edge"

This could not be further from the truth. I simply have no sympathy for people who refuse to read the manual or an intro to using a tool, and then complain about the tool being hard to use. Yeah.. it's hard because you didn't do any reading! Git is actually really easy if you read about the model that it uses. Most people don't need to venture out beyond ~5-6 subcommands, and even then it's easy to learn new subcommands like cherrypick, rebase, etc.

Adobe Photoshop, as another example, has a learning curve, but that tool is indispensable for professionally working on / editing images. (GIMP is also good, but that's not in the scope of this discussion). A lot of beginner issues are basically PEBKAC because they didn't read the manual. Same with Pro Tools, or probably any other software used by industry professionals. They're harder to use but what you can do with them (since they treat you like an adult, instead of holding your hand and limiting you) is incomparable to the output of apps designed for casual users.

Re:Is Git Irreplaceable? (2019) by brigandish on Thursday January 09, 2020 @08:56PM (#22007808)
What can Git do that Fossil or Mercurial can't?
Re:Is Git Irreplaceable? (2019) by Ntrails on Tuesday January 07, 2020 @03:58PM (#21984754)
Deleting master is a thing that would _actually_ never have occurred to me! A neat trick

That being an example that I remember from late last year, there are just sharp edges to git I end up catching myself on :)

Re:Is Git Irreplaceable? (2019) by vvillena on Tuesday January 07, 2020 @07:49PM (#21987064)
The git "master" branch is just an example of 'convention over configuration': some commands use it as the default argument, just like "origin" is the default remote name. Nothing in git is special or sacred! :)
Re:Is Git Irreplaceable? (2019) by raducu on Tuesday January 07, 2020 @10:24AM (#21980749)
Is there a reason for -D and not -d? Wouldn't -D also delete the remote branch if you accidentally pushed your changes?
Re:Is Git Irreplaceable? (2019) by vvillena on Tuesday January 07, 2020 @12:40PM (#21982309)
"git branch -d" doesn't remove a branch if that means losing track of some local commits. "-D" doesn't check that. The "git branch" commands only operate on your local repo, they don't push any changes to remote repos and they don't pull commits from anywhere.
Re:Is Git Irreplaceable? (2019) by WorldMaker on Tuesday January 07, 2020 @01:51PM (#21983222)
`-D` doesn't involve the remote at all (unless you are using something like the intentional remote:branch syntax which this example isn't). It is a force delete in that if there were commits locally in that branch and only in that branch it should still delete that branch. It should be unlikely you need that force because the first step was to branch everything as is, so it is safer to just use `-d`, but if the intention is to "blat" it from orbit anyway, `-D` is that.
Re:Is Git Irreplaceable? (2019) by DaiPlusPlus on Tuesday January 07, 2020 @09:06AM (#21979975)
I wish git had a “metahistory” feature to allow everyone to undo anything. A `git revert` isn’t of any help when you’ve already merged and pushed.
Re:Is Git Irreplaceable? (2019) by jerf on Tuesday January 07, 2020 @09:07AM (#21979987)
It's called "git reflog": https://www.edureka.co/blog/git-reflog/

Though you do have to have committed. One of the things I hammer on in my tutorials for work is that if you get confused in git, make sure you commit. If you commit, you can take your problem to the other engineers and we can almost certainly get you straightened away. Fail to commit, though, and you really may lose something.

Also, metapoint about git: While I won't deny its UI carries along some dubious decisions carried over from the very first design, in 2020, basically, if you thing "Git really ought to be able to do [this sensible thing]", it can. It has that characteristic that open source software that has been worked on by a ton of contributors has, which is that almost anything you could want to do was probably encountered by somebody else and solved five years ago. It just may take some searching around to figure out what that is. (And on the flip side, when you read the git man pages and are going "Why the hell is that in there?", the answer may well be "a problem that you're going to have in six months".)

Re:Is Git Irreplaceable? (2019) by jorvi on Tuesday January 07, 2020 @09:34AM (#21980224)
> make sure you commit

This is not absolute gospel. If you screw up a rebase and commit, whatever you removed in the rebase is simply gone.

Re:Is Git Irreplaceable? (2019) by jerf on Tuesday January 07, 2020 @09:52AM (#21980401)
Are you saying that with knowledge of what "git reflog" is? I suspect not. I'd really need to see a sequence of commands that removes committed state from the repo to buy this. If you try to produce it, bear in mind the first thing I'm going to do is run "git reflog" on the result, so if you find your committed state is still there, then I'm going to say it's still saved.

(That's not a git thing. I don't really even want some sort of hypothetical source control system that literally tracks every change I make. It's technically conceivable and should be practical to what would at least be considered a "medium sized" project in the git world, but I'd just be buried in the literally thousands of "commits" I'd be producing an hour. Failing that sort of feature, a source control system can't help but "lose" things not actually put into it.)

Re:Is Git Irreplaceable? (2019) by mannykannot on Tuesday January 07, 2020 @10:57AM (#21981133)
As I am not familiar with the details of reflog (I don't recall ever using it) I took a look at the article. I wasn't long until I reached what looks like a caveat: "This command has to be executed in the repository that had the lost branch. If you consider the remote repository situation, then you have to execute the reflog command on the developer’s machine who had the branch." Joe, who works on another continent, quit last week and his computer was a VM...

OK, so we have backups of his VM and we can recreate a clone of it, but will that be satisfactory? Are there any issues with hardware MAC addresses or CPU ids? How far down the rabbit hole of git minutiae do you have to go before you are confident that you can do all basic source-control operations safely?

Re:Is Git Irreplaceable? (2019) by jerf on Tuesday January 07, 2020 @12:11PM (#21981951)
No source control system can solve the problem of not having things it was never given.
Re:Is Git Irreplaceable? (2019) by gallier2 on Tuesday January 07, 2020 @12:59PM (#21982586)
git log --reflog --all

is the more important imo than

git reflog

Re:Is Git Irreplaceable? (2019) by RichardCA on Tuesday January 07, 2020 @10:58AM (#21981148)
The main thing that people fail to understand is that commits are immutable and the overall commit graph is immutable (with the caveat that pathways in the graph that don't end in a branch head are subject to garbage collection).

A rebase does not destroy information. It creates new commits and moves the branch head to a different spot on the graph.

The reason git is seen as painful is because you can't claim expertise until you develop the ability to form a mental map of the graph. But once you do this the lights turn on and everything starts to make sense.

This is why the mantra "commit early and often" still holds. The more experienced git user will tell the newer people this, so when they come with a mess it will always be recoverable.

Re:Is Git Irreplaceable? (2019) by fulafel on Tuesday January 07, 2020 @11:24AM (#21981413)
That GC a pretty big caveat! Combined with the fact that unreferenced objects are never pushed.

reflog is like undelete in filesystems, it's a probabilistic accident recovery mechanism for an individual computer (repo checkout in this case) that you can try to use if you don't have backups.

Re:Is Git Irreplaceable? (2019) by vvillena on Tuesday January 07, 2020 @12:59PM (#21982583)
In any case, git garbage collection isn't a common phenomenon. It usually triggers every few weeks, even in repos with high activity. The chance of hitting a GC that deletes an untracked commit you need is extremely small.
Re:Is Git Irreplaceable? (2019) by chousuke on Tuesday January 07, 2020 @09:46AM (#21980329)
How would it be gone? You can't rebase onto a dirty working directory so you can't blow away uncommitted changes accidentally and any state prior to and during the rebase is always recoverable via the reflog.

It takes trying to do anything that's not easily recoverable as long as you commit before you start messing around and don't rm -rf .git.

Re:Is Git Irreplaceable? (2019) by rohansingh on Tuesday January 07, 2020 @09:52AM (#21980393)
It's definitely not gone. Just `git checkout ORIG_HEAD` and you'll be back to whatever the tree was before you rebased.
Re:Is Git Irreplaceable? (2019) by gallier2 on Tuesday January 07, 2020 @12:58PM (#21982570)
NO. Nothing is gone after commit. You just don't see it.

Make a git log --reflog --all and you will see all the commits you made (or rebase made) in the last 3 months.

You can than rescucitate an old branch by simply putting a branch name on it with git branch newname <old sha1>

Re:Is Git Irreplaceable? (2019) by sergiosgc on Tuesday January 07, 2020 @09:56AM (#21980441)
It won't be gone until you actively prune dangling commits. The commit may not be reachable from the HEADs of existing branches, but go through the reflog and your commits will be there. You can then create a branch to make the commit reachable.
Re:Is Git Irreplaceable? (2019) by vrsfvwae5tbh on Tuesday January 07, 2020 @09:45AM (#21980321)
Does this not show up in the reflog?
Re:Is Git Irreplaceable? (2019) by gallier2 on Tuesday January 07, 2020 @12:55PM (#21982529)
You have a branch named <branchname> you do your operation that fouls up your branch. If you check with

git log --reflog --all

you will see with this magical command that git DOESN'T REMOVE any commit. Your old tree is still there, only normally hidden. The commit that was there before you fouled up your branch is still there.

You now only need to set your branch to the old commit. A branch is nothing else than a pointer in the tree.

You have 2 possiblities to change the commit a branch points to

1. git branch --force <branchname> SHA1 (works only if <branchname> is not the current checked-out branch. Simply checking out with the SHA1 works also as it deteches the HEAD).

2. replace the SHA1 in the text file in .git/refs/heads/<branchname> by the SHA1 where you want the branch to point to.

With that, your repo is in the same state it was before your error.

Re:Is Git Irreplaceable? (2019) by eyegor on Tuesday January 07, 2020 @09:07AM (#21979984)
Harkening back to my early days of git, I have a rough guess as to what you can do to fix that. If all you want is remote master,

  git stash
  git checkout master
  git stash
  git fetch origin
  git reset --hard origin/master
and maybe a 'git rm -r --cached .' in case you have staged files you didn't intend to which stash failed to drop.
Re:Is Git Irreplaceable? (2019) by munmaek on Tuesday January 07, 2020 @09:40AM (#21980275)
With the amount of information available, there is no excuse:

* https://rogerdudler.github.io/git-guide/

* https://git-scm.com/book/en/v2

Also see stackoverflow.

Git is a complex tool because it’s tackling a complex problem. I don’t see a way of making it “easier” without massively reducing what it can do. It’s like saying we should reduce a formula one car so people can use it without reading up on it, etc.

If something happens once, it happens. If something happens multiple times then it means you’re not evaluating why it occurred in the first place and learning from it. No tool in the world can solve this problem because it’s not a problem with the tool, rather the user.

Git is really not so hard, but it requires a little reading.

Re:Is Git Irreplaceable? (2019) by metabagel on Tuesday January 07, 2020 @10:22AM (#21980728)
Git isn’t something which you can generally be successful using in a shallow way. Most developers will need to devote significant time and energy to mastering it. There really needs to be a better layer on top of it in order to make it easier for developers to figure out how to do what they want to do. Some of the commands and switches don’t seem to be orthogonal and/or intuitive.
Re:Is Git Irreplaceable? (2019) by munmaek on Tuesday January 07, 2020 @11:24AM (#21981415)
Git already has layers on top of it like git porcelain or the various GUI tools that attempt to handle things smoothly.

> significant time and energy

All someone needs is to read through https://rogerdudler.github.io/git-guide/, and learn a few commands.

Are we seriously going to refer to “reading the manual” as “significant time and energy”? In this case you don’t even have to read the manual, just a primer on how git works. You know, on how the tool that you’re using works. Why are people so allergic to spending even a modicum of time on learning a tool that massively simplifies their life and makes their work possible?

Do plumbers complain about having to read manuals for the equipment that they use? Electricians?

As programmers our tools are easier to learn and use, yet we complain about having to any work at all.

Why even be a programmer? If reading about git is so hard, what about the rest of the field that doesn’t even have documentation?

How about we don’t make tools that cater to the lowest common denominator, in this case people who basically can’t be assed to do anything? RTFM.

Re:Is Git Irreplaceable? (2019) by Frondo on Tuesday January 07, 2020 @11:44AM (#21981639)
Because a lot of us have used tools besides git that enable the workflow we need without that complexity, and without the fragility that often necessitates going to stackoverflow or asking on a slack channel.

I have a way of picking the losing side so I've been using mercurial for everything until now, and until now Bitbucket offered hg. They're decommissioning it so I'm moving over to git and I feel like my workflow has been hampered, not just in the immediate complexity of learning the new tool, but in the ongoing complexity of using a less good tool for my needs.

I'm dealing with it, but the situation you're describing isn't really the one that I and a lot of other whiners are dealing with.

Re:Is Git Irreplaceable? (2019) by josefx on Tuesday January 07, 2020 @02:07PM (#21983433)
> Because a lot of us have used tools besides git that enable the workflow we need without that complexity

I spend ages unfucking local svn working copies and long running branches on both windows and linux. git needs some serious flaws to keep up with that experience.

Re:Is Git Irreplaceable? (2019) by anoncake on Tuesday January 07, 2020 @06:04PM (#21986196)
> Because a lot of us have used tools besides git that enable the workflow we need

Thankfully the standard DVCS is flexible enough to enable the workflows others need too.

Re:Is Git Irreplaceable? (2019) by wasdfff on Tuesday January 07, 2020 @10:53AM (#21981102)
A lot of people get by just staging and pushing/pulling commits, myself included. That’s 3 commands, 4 if you count git status. You do not need to dig deep to get a lot of use out of git as a basic remote sync.
Re:Is Git Irreplaceable? (2019) by wyoung2 on Tuesday January 07, 2020 @11:07AM (#21981243)
> Git is a complex tool because it’s tackling a complex problem.

Fossil tackles much the same sort of problem, yet it's far simpler to use.

Most of Git's problems are due to purposeful choices, but they're design choices, not inherent aspects of how a DVCS must behave.

We've laid out our case for the differences here: https://fossil-scm.org/fossil/doc/trunk/www/fossil-v-git.wik...

Re:Is Git Irreplaceable? (2019) by munmaek on Tuesday January 07, 2020 @11:45AM (#21981643)
> their thing: Sprawling, incoherent, and inefficient

> our thing: Self-contained and efficient

This is not biased in any way and makes me want to continue reading. /s

Also, you can’t claim something to be “efficient” when it’s doing many different things like scm, issues/tickets, a web forum/ui ....

Then you have non-issues like git being installed via a package manager instead of dragging and dropping a binary. Yeah, this is such a huge problem that concerns people, better switch to Better Project (tm).

And then you take Gitlab and conflate Gitlab’s issues with problems with Git. I guess gogs/gitea don’t exist?

This page needs to be rewritten to simply list the differences in neutral language. There are good points but they’re lost in unnecessary epithets like “caused untold grief for git users”. I get it: git bad, our product good. Switch!

—

Personally, I don’t want something that tries to do many different things all at once.

Re:Is Git Irreplaceable? (2019) by wyoung2 on Tuesday January 07, 2020 @01:10PM (#21982695)
> This is not biased in any way

Of course we're biased, but every row in that table corresponds to a section below where we lay out our argument for the few words up in the table at the top.

Here's the direct link for that particular point:

https://fossil-scm.org/fossil/doc/trunk/www/fossil-v-git.wik...

Now, if you want to debate section 2.2 on its merits, we can get into that.

> you can’t claim something to be “efficient” when it’s doing many different things

We can when all of that is in a single binary that's 4.4 MiB, as mine here is.

A Git installation is much larger, particularly if you count its external dependencies, yet it does less. That's what we mean when we say Git is "inefficient."

But I don't really want to re-hash the argument here. We laid it out for you already, past the point where you stopped reading.

> git being installed via a package manager instead of dragging and dropping a binary. Yeah, this is such a huge problem that concerns people, better switch to Better Project (tm).

It is on Windows, where they had to package 44-ish megs of stuff in order to get Git to run there.

On POSIX platforms, the package manager isn't much help when you want to run your DVCS server in a chroot or jail. The more dependencies there are, the more you have to manually package up yourself.

If your answer to that is "just" install a Docker container or whatever, you're kind of missing the original point. `/home/repo/bin/fossil` chroots itself and is self-contained within that container. (Modulo a few minor platform details like /dev/null and /dev/urandom.)

> This page needs to be rewritten to simply list the differences in neutral language.

We accept patches, and we have an active discussion forum. Propose alternate language, and we'll consider it.

> unnecessary epithets like “caused untold grief for git users”

You don't have to go searching very hard to find those stories of woe. They're so common XKCD has satirized them. We think the characterizations are justified, but again, if you think they're an over-reach, propose alternate language.

> I don’t want something that tries to do many different things all at once.

Not a GitHub user, then?

Re:Is Git Irreplaceable? (2019) by Frondo on Tuesday January 07, 2020 @11:48AM (#21981676)
Hey, are you a fossil dev?

I haven't used nor looked at fossil in maybe 5 years, but had a couple of questions.

Does fossil now have any kind of email support built in to the ticket manager? I remember when I tried to use fossil for actual production use, there was no way to trigger emails sent when, e.g. tickets were submitted, and one of the devs said to just write a script to monitor the fossil rss feed and send the appropriate email, which seemed like a baroque and fragile (and time-consuming) solution.

And is any more of the command-line behavior configurable (like the mv/rm behavior -- affecting the file on disk as well as the repository, or just marking the file as (re)moved in the repository)?

Re:Is Git Irreplaceable? (2019) by wyoung2 on Tuesday January 07, 2020 @12:59PM (#21982587)
> Hey, are you a fossil dev?

I have commit access, yes, but mainly I work on the docs.

> Does fossil now have any kind of email support built in to the ticket manager?

Yes. It was added in support of the forum feature last year, but it also applies to several other event types: https://fossil-scm.org/fossil/doc/trunk/www/alerts.md

> one of the devs said to just write a script to monitor the fossil rss feed

Probably me. :)

> seemed like a baroque and fragile (and time-consuming) solution.

A dozen lines of Perl; easy-peasy. That and a pile of CPAN modules, but that's easily fetched with `cpanm`.

> the mv/rm behavior -- affecting the file on disk as well as the repository

The default you're referring to was changed a few years ago: the old `--hard` option is now the default.

Re:Is Git Irreplaceable? (2019) by jnurmine on Tuesday January 07, 2020 @01:59PM (#21983334)
By the way, the "one checkout per repository" is not strictly true. You can use "git worktree"; this is a lightweight way to reuse an existing git repository and have each worktree use a different branch. It's a nice feature, and I use it daily.

Also, a comment about the argumentation in "test before commit". It feels a bit artificial wrt. what can be done locally, what git commit and git push do and what their relation is in a sane workflow. Certainly, one can push untested stuff to the remote server by mistake; but, even so, this should be OK, because if one can push directly to important branches like master or similar without going through any reviews and other sanity checks, one has a problem... and the problem isn't really Git :)

Re:Is Git Irreplaceable? (2019) by wyoung2 on Tuesday January 07, 2020 @02:42PM (#21983902)
> By the way, the "one checkout per repository" is not strictly true.

You must be referring to just the table at the top, not to the detailed argument below, which mentions git-worktree and then points you to a web search that gives a bunch of blog articles, Q&A posts, project issue reports and such talking about the problems that come from using that feature of Git.

I suspect this is because git-worktree is a relatively recent feature of Git (2.5?) so most tutorials aren't written to assume use of it, so most tools don't focus on making it work well, so bugs and weaknesses with it don't get addressed.

Fossil is made to work that way from the start, so you can't run into these problems with Fossil. You'd have to go out of your way to use Fossil in the default Git style, such as by cloning into ~/ckout/.fossil and opening that repo in place.

> test before commit". It feels a bit artificial wrt. what can be done locally, what git commit and git push do and what their relation is in a sane workflow.

That just brings you back to the problems you buy when separating commit from push, which we cover elsewhere in that doc, primarily here: https://www.fossil-scm.org/xfer/doc/trunk/www/fossil-v-git.w...

Re:Is Git Irreplaceable? (2019) by balfirevic on Tuesday January 07, 2020 @10:26PM (#21987977)
> Fossil is made to work that way from the start, so you can't run into these problems with Fossil. You'd have to go out of your way to use Fossil in the default Git style, such as by cloning into ~/ckout/.fossil and opening that repo in place.

That's unfortunate. Reading the comments here, switch-branch-in-place is seen as some kind of flaw, but I don't think I would voluntarily use a VCS that doesn't let me easily do that (it's most sensible way for me to work, from way before Git was a thing).

Re:Is Git Irreplaceable? (2019) by wyoung2 on Wednesday January 08, 2020 @10:33AM (#21992242)
> switch-branch-in-place is seen as some kind of flaw

You're conflating two separate concepts:

1. Git's default of commingled repo and and working/checkout directory

2. Switch-in-place workflow encouraged by #1

Fossil doesn't do #1, but that doesn't prevent switch-in-place or even discourage it. The hard separation of repo and checkout in Fossil merely encourages multiple separate long-lived checkouts.

A common example is having one checkout directory for the active development branch (e.g. "trunk" or "master") and one for the latest stable release version of the software. A customer calls while you're working on new features, and their problem doesn't replicate with the development version, so you switch to the release checkout to reproduce the problem they're having against the latest stable code. When the call ends, you "cd -" to get back to work on the development branch, having confirmed that the fix is already done and will appear in the next release.

Another example is having one checkout for a feature development branch you're working on solo and one for the team's main development branch. You start work from the team's working branch, realize you need a feature branch to avoid disturbing the rest of the team, so you check your initial work in on that branch, open a checkout of that new branch in a separate directory and continue work there so you can switch back to the team's working branch with a quick cd if something comes up. Another team member might send you a message about a change needed on the main working branch that you're best suited to handle: you don't want to disturb your personal feature branch with the work by switching that checkout in place to the other branch, so you cd over to the team branch checkout, do the work there, cd back, and probably merge the fix up into your feature branch so you can work with the fix in place there, too.

These are just two common reasons why it can be useful to have multiple long-lived checkouts which you switch among with "cd" rather than invalidate build artifacts multiple times in a workday when switching versions.

Git can give you multiple long-lived working checkouts via git-worktree, but according to the Internets it has several well-known problems. Not being a daily Git user, I'm not able to tell you whether this is still true, just that it apparently has been true up to some point in the past.

Since no one is telling me those issues with git-worktree are all now fixed, it remains a valid point of comparison in the fossil-v-git article.

Re:Is Git Irreplaceable? (2019) by balfirevic on Wednesday January 08, 2020 @11:29AM (#21992863)
If what you're trying to tell me is that I can use switch-in-place workflow in Fossil as easily as in Git then that's cool. Thumbs up!

Edit: It could be worth it to emphasize this in the Fossil vs. Git comparison that you linked, as it wasn't very clear to me after reading it.

Re:Is Git Irreplaceable? (2019) by wyoung2 on Wednesday January 08, 2020 @01:10PM (#21994075)
It's updated now, here: https://www.fossil-scm.org/fossil/doc/trunk/www/fossil-v-git...

Thanks for the feedback!

Re:Is Git Irreplaceable? (2019) by jnurmine on Tuesday January 07, 2020 @06:38PM (#21986511)
> You must be referring to just the table at the top, not to the detailed argument below

Well, not entirely, because in my opinion the detailed argument kind of hand-waves away the entire git worktree. Continuously switching branches inside a single large Git repo is certainly a suboptimal way to work with Git, but most of the time one should be able to avoid that with the worktree (though the worktree stuff is, of course, not a miracle cure for everything).

Re:Is Git Irreplaceable? (2019) by wyoung2 on Tuesday January 07, 2020 @07:26PM (#21986890)
You’re not addressing the list of problems resulting from the use of this tacked-on feature.

Also, Git continues to be taught with the switch-in-place method by default.

I’m not saying it is impossible to get a Fossil-like workflow with Git, just that there are consequences from that not being the default.

Re:Is Git Irreplaceable? (2019) by jnurmine on Monday January 20, 2020 @01:06AM (#22096666)
Getting a "Fossil-like workflow with Git" is not really the point, is it? One could argue that Fossil does not support "Git like workflow". It is not really a good argument either way.

It is not like Fossil's workflow is a global optimum, it's just something Fossil does well.

Re:Is Git Irreplaceable? (2019) by u801e on Tuesday January 07, 2020 @03:05PM (#21984196)
> It’s like saying we should reduce a formula one car so people can use it without reading up on it, etc

A far better analogy is:

It's like saying we should reduce a programming language so people can use it without reading up on it, etc.

Re:Is Git Irreplaceable? (2019) by wyoung2 on Wednesday January 08, 2020 @02:41PM (#21994951)
Sorry, but this is a terrible analogy.

The core problem with it is that very few people can get paid more by being better at using their [D]VCS, whereas those more skilled with their programming language(s) of choice often do get paid more to wield that knowledge.

Consequently, most people do not fully master their version control system to the same level that they do with their programming language, their text editor, etc.

To be specific, there are many more C++ wizards and Vim wizards than there are Git wizards.

In situations like this, I prefer a tool that lets me pick it up quickly, use it easily, and then put it back down again without having to think too much about it.

You see this pattern over and over in software. It is why all OSes now have some sort of Control Panel / Settings app, even if all it does is call down to some low-level tool that modifies a registry setting, XML file, or whatever, which you could edit by hand if you wanted to. These tools exist even for geeky OSes like Linux because driving the OS is usually not the end user's goal, it is to do something productive atop that OS.

[D]VCSes are at this same level of infrastructure: something to use and then get past ASAP, so you can go be productive.

Re:Is Git Irreplaceable? (2019) by etripe on Tuesday January 07, 2020 @11:57AM (#21981792)
You could always do:

  git reflog
to see when you last checked out master, then:

  git reset <commit hash> --soft
to reset to the commits at that point (but keep your files the same)

  git add . && git stash save
to stash your changes (not 100% sure you actually need the "git add ." part)

  git pull
in master

and then finally:

  git stash pop
and commit again as needed.
Re:Is Git Irreplaceable? (2019) by wyoung2 on Tuesday January 07, 2020 @09:24AM (#21980128)
> Git is hard for idiots imo, and there are a lot of us

Yes, thus https://xkcd.com/1597/

I find myself saying "git reset --hard origin/" and such with disturbing frequency.

Both are examples of "I give up; it's faster to start over." This is not what I want in a DVCS.

Re:Is Git Irreplaceable? (2019) by wasdfff on Tuesday January 07, 2020 @10:50AM (#21981068)
Git push/pull -f

Then write a little merge message and you are good to go.

Re:Is Git Irreplaceable? (2019) by levosmetalo on Tuesday January 07, 2020 @08:24AM (#21979654)
> Git is hard for idiots imo, and there are a lot of us

Then let the idiots end up screwing their own local repo, instead of doing some magic and making it easy to screw up upstream or someone else repo.

Re:Is Git Irreplaceable? (2019) by dragonwriter on Tuesday January 07, 2020 @04:47AM (#21978463)
> I think it's simple and elegant as a data structure, when what people need and want is something that is (at least also) simple and elegant in its UX and most importantly VERY simple and elegant for the 80/20 use cases.

That's what UIs (whether CLIs or otherwise) for standardized workflows like git-flow are, IMO.

Re:Is Git Irreplaceable? (2019) by alkonaut on Tuesday January 07, 2020 @05:09AM (#21978578)
It doesn't nearly go all the way there though. Why do people need to use a command line and a gui tool (usually) for git? Because it's fundamentally not written to be used with a GUI. That I think is one of its biggest flaws. Using a GUI with git always feels like you are missing vital information and just trying to poke a cli underneath to do what you want.

Some design decisions also shine through like "no branch is more important than any other branch" which is completely mental considering how people actually use git.

Re:Is Git Irreplaceable? (2019) by crdoconnor on Tuesday January 07, 2020 @09:39AM (#21980260)
Most of the guis are crap because everybody who builds them thinks that a GUI should just be a more or less a visual representation of the command line.
Re:Is Git Irreplaceable? (2019) by jerf on Tuesday January 07, 2020 @09:14AM (#21980044)
"Why do people need to use a command line and a gui tool (usually) for git?"

You don't. The reason is that you're using a tool that didn't budget the time to directly work on git data files and it uses the command line under the hood, because that's a hard business case to make for most small tools. This is not fundamental to git; the very top-end git-based tools like Github or Bitbucket all do their own internal, direct implementation of git functionality for this reason. It's not a characteristic of git, it's a characteristic of the GUI tools you're using.

A perfectly sensible one based on perfectly sensible engineering tradeoffs, let me add; no criticism of such tools intended. Git's internals from what I've seen are not particularly difficult to manipulate directly as such things go, but you are simply by the nature of such a thing taking on a lot more responsibility than if you use the command line-based UI.

Re:Is Git Irreplaceable? (2019) by saurik on Tuesday January 07, 2020 @05:50AM (#21978790)
Another simple tracking thing that git doesn't do that would easily make git much much better is if it tracked when you did a cherrypick of another commit in the commit graph (not just as some kind of metadata comment in the commit message, but as a kind of soft parent); then if you did a rebase, you could actually "reverse engineer" the rebase (if and only if you absolutely needed to, such as to track what happened during a squash, or to automate re-applying the rebase correctly to someone who was tracking one of the prior commits) and it would largely solve the question of "merge or rebase" with "por que no los dos".
Re:Is Git Irreplaceable? (2019) by adrianmsmith on Tuesday January 07, 2020 @07:35AM (#21979337)
Another thing that Git does not track -

I saw a web designer check in a huge hierarchy of empty directories which would be the structure of the new project that their team should work on. They were quite surprised when it didn't show up on any of the other designer's computers after a "pull". They had to go to the "Git guru" for help.

Windows and Mac both have directories as a major fundamental concept. Everyone knows them and is familiar with them. Subversion tracks directories. Git does not.

Re:Is Git Irreplaceable? (2019) by ori_b on Tuesday January 07, 2020 @09:24AM (#21980125)
I also can't figure out why it doesn't: An empty tree object should be sufficient to do the job. I actually had to write extra code in git9[1] to avoid accidentally allowing empty directories.

[1] https://github.com/oridb/git9

Re:Is Git Irreplaceable? (2019) by debaserab2 on Tuesday January 07, 2020 @10:22AM (#21980717)
According to this[1], which I think might be an official FAQ:

> Currently the design of the Git index (staging area) only permits files to be listed, and nobody competent enough to make the change to allow empty directories has cared enough about this situation to remedy it.

[1] https://git.wiki.kernel.org/index.php/GitFaq#Can_I_add_empty...

Re:Is Git Irreplaceable? (2019) by ori_b on Tuesday January 07, 2020 @03:27PM (#21984424)
Hm. I should see how git behaves when it gets a repository with empty directories. If it doesn't blow up, I may just add support -- it'd be useful for me.
Re:Is Git Irreplaceable? (2019) by eyegor on Tuesday January 07, 2020 @09:13AM (#21980034)
It kind of does, iff you have a file there. In which case it tracks the path to the file, and then creates the relevant directory structure to get to it.

Of course git is also incredibly painful and brittle if you want "exclude/except" behavior on the gitignore involving subdirectories.

Re:Is Git Irreplaceable? (2019) by adrianmsmith on Tuesday January 07, 2020 @08:29AM (#21979692)
Another thing Git does not and cannot even attempt to do - file locking.

The assumption behind Git is, everyone develops on their machines and/or branches, and then things are merged. This only works for files which can be merged.

There are plenty of things pretty much any project wants to track which cannot be merged, for example Word documents (documentation), Photoshop files (source of graphics), PNGs (icons in webapps), and so on.

With a centralized system, that's easy, just go over to using file locks ("svn lock") for those files. With a distributed system, that's impossible.

Re:Is Git Irreplaceable? (2019) by wyoung2 on Tuesday January 07, 2020 @09:40AM (#21980267)
> Another thing Git does not and cannot even attempt to do - file locking.

That's a seriously hard problem for a DVCS if you're serious about the "D".

This topic turned into [the single longest thread in the history of the Fossil forum](https://www.fossil-scm.org/forum/forumpost/2afc32b1ab) because it drags in the CAP theorem and all of the problems people run into when they try to have all three of C, A, and P at the same time.

To the extent that Fossil based projects are usually more centralized than Git ones, Fossil has a better chance of solving this, but I'm still not holding my breath that Fossil will get what a person would naively understand as file locking any time soon.

> Word documents (documentation), Photoshop files (source of graphics), PNGs (icons in webapps), and so on.

You want to avoid putting such things into a VCS anyway, because it [bloats the repo size](https://fossil-scm.org/fossil/doc/trunk/www/image-format-vs-...). I wrote that article in the context of Fossil, but its key result would replicate just as well under Git or anything else that doesn't do some serious magic to avoid the key problem here.

Instead of Word files, check in Markdown or [FODT](https://en.wikipedia.org/wiki/OpenDocument_technical_specifi...). (Flat XML OpenDocument Text.) Or with Fossil, put the doc in the wiki.

Instead of PNG, check in BMP, uncompressed TIFF, etc., then "build" the PNG as part of your app's regular build process.

This has the side benefit that when you later change your mind on the parameters for the final delivered PNGs, you can just adjust the build script, not check in a whole new set of PNGs. My current web app has several such versions: 8-bit paletted versions from back before IE could handle 24-bit PNG, then matted 24-bit PNGs from the days when IE couldn't handle transparency in PNG, and finally the current alpha-blended 24-bit PNGs. It'd have been better if I'd checked in TIFF originals and built deliverable PNGs at each step.

Re:Is Git Irreplaceable? (2019) by WorldMaker on Tuesday January 07, 2020 @02:05PM (#21983407)
> Instead of Word files, check in Markdown or [FODT]

Another fun option is to unzip the DOCX and check that in, since it is mostly a collection of XML files in a zip container. I built a tool to automate zipping/unzipping files like DOCX years ago as pre-commit/post-checkout/post-merge hooks. [1] It's an interesting way to source control some types of files if you can find a way to deconstruct them into smaller pieces that merge better. Admittedly, merging Office Open XML by hand is not a great experience (and dealing with subtly broken or corrupt internal contents is not fun, because programs like Word can fussy when things are even slightly wrong), but you get better diffs sometimes than you would expect.

[1] https://github.com/WorldMaker/musdex

Re:Is Git Irreplaceable? (2019) by wyoung2 on Tuesday January 07, 2020 @02:47PM (#21983960)
Yes, I cover that option for Fossil at the end of the pointed-to document. I did it in terms of Makefiles rather than commit hooks, but whichever...
Re:Is Git Irreplaceable? (2019) by jessermeyer on Thursday January 09, 2020 @07:44AM (#22000694)
> You want to avoid putting such things into a VCS anyway, because it [bloats the repo size]

How do you suggest projects like games handle this, where data files are naturally linked to source files? Imagine trying to sort out an animation bug when you only have source level tracking and no idea which version of the animation data corresponds to the animation source files of the bug report. These data files are not 'built' from the 'build' step as they are the product of artists.

Re:Is Git Irreplaceable? (2019) by alkonaut on Tuesday January 07, 2020 @03:04PM (#21984177)
I’d guess not one user in 100.000 uses git decentralized (as in, doesn’t have a blessed “central” repo). It’s the disabling of locking that should be the special case! The big problem with git is that you can’t mark a repo as a master repo/blessed repo (which would be the one where lockfiles are stored). A lot of functionality would be helped if the commands could know which end is the important/central one.
Re:Is Git Irreplaceable? (2019) by wyoung2 on Tuesday January 07, 2020 @03:23PM (#21984375)
> I’d guess not one user in 100.000 uses git decentralized

I understand your sentiment, but the denominator in that fraction is probably much lower than your guess.

Consider even simple cases like the disconnected laptop case. You may work at a small office with only local employees, and so you have one central "blessed" repo, but if one person locks a file and then goes off to lunch, working on the file while at the restaurant, you still have a CAP problem:

CA: Because the one guy with a laptop went off-network, you have no full quorum, so no one can use the repo at all until he gets back and rejoins the network. (No practical DVCS does this, but it's one of the options, so I list it.)

CP: When the one guy went off to lunch, we lost the ability to interact with his lock, and that will continue to be the case until he gets back from lunch. Also vice versa: if someone still at the office takes out a lock, the guy off at lunch doesn't realize there is lock, so he could do something bad with the "locked" file. (This is the mode DVCSes generally run in by default.)

AP: No locking at all, thus no consistency, thus your original problem that inspired the wish to have file locking.

Re:Is Git Irreplaceable? (2019) by alkonaut on Tuesday January 07, 2020 @06:19PM (#21986346)
Not sure I understand the problem. If I lock fileX and go to lunch, then I own the lock on that file while I’m out to lunch. It’s basically analogous me pushing the file fileX.lock to the repo next to fileX, with my user id as content. I can only do it if it isn’t there.

Everyone else will only see that lock if they fetch and if they don’t, they might edit their local copy of fileX too, but would be prevented from pushing their version to the blessed repository by the lock. They can push a copy under another name, or wait until I have removed the lock (but probably can’t resolve the conflict anyway because it’s likely a binary document). So they user will remember to never start editing without taking the lock in the future.

It’s not perfect by any stretch of the imagination but it’s all anyone asks for in terms of file locking. It’s what Subversion always did.

Re:Is Git Irreplaceable? (2019) by wyoung2 on Tuesday January 07, 2020 @07:23PM (#21986859)
> Not sure I understand the problem. If I lock fileX and go to lunch, then I own the lock on that file while I’m out to lunch.

And if you go on vacation for two weeks instead?

Re:Is Git Irreplaceable? (2019) by alkonaut on Wednesday January 08, 2020 @01:41AM (#21988943)
Same thing obviously. But this is just a method of communication. It’s instead of emailing/shouting “don’t edit the background image today please” across the office.

An admin can remove the lock. Or you can allow force-pushing by anyone to replace it or whatever.

Not sure why this is seen as so complicated, version control systems have done it since forever. It’s not trying to solve some distributed lock system in a clever way. It’s dumb centralized mutex per file. And yet again this is all that’s needed (and it’s also added to git in git-LFS!).

Re:Is Git Irreplaceable? (2019) by ivanbakel on Tuesday January 07, 2020 @08:53AM (#21979863)
You can set up custom merge drivers for different file types.

More importantly, if you've got stuff in your decentralised repo that shouldn't be decentralised, that's not the fault of the DVCS you're using, it's your fault. That everything looks like a nail does not speak against the value of a hammer.

Re:Is Git Irreplaceable? (2019) by adrianmsmith on Tuesday January 07, 2020 @09:05AM (#21979963)
> You can set up custom merge drivers for different file types

True, but there are inevitably some files which still cannot be merged, so the problem remains.

> More importantly, if you've got stuff in your decentralised repo that shouldn't be decentralised, that's not the fault of the DVCS you're using, it's your fault.

Indeed, if you want to store the history of your files - the whole software including the icons it uses, so that you can go back to any previous version and build it - and you chose a DVCS like Git, I would agree the fault was yours.

That's basically what I was arguing, that Git is the wrong choice if you have any binary assets like icons (even if those assets have small filesize) due to the lack of locking, sorry if I was unclear.

Re:Is Git Irreplaceable? (2019) by munmaek on Tuesday January 07, 2020 @09:47AM (#21980336)
You should not be checking in binary files into git. That defeats the entire purpose and bloats the repo size enormously.

Git LFS should be used instead. Or storing a Sha256sum and putting the file elsewhere.

Re:Is Git Irreplaceable? (2019) by imtringued on Tuesday January 07, 2020 @10:01AM (#21980504)
That is a solution but then it's no longer distributed.
Re:Is Git Irreplaceable? (2019) by alkonaut on Wednesday January 08, 2020 @01:56AM (#21989002)
Being distributive isn’t a feature for the binary files contents. I don’t want 100 historical versions of a huge game texture, just the latest one. The history is distributed however, so I can see who changed the texture even when disconnected. Centralized binaries like git LFS works like any package/asset manager.

There is no one that would want distributed binaries in git. But people also don’t want to switch from git to something else just because they have a 100GB or 10TB repo. Tooling (build tools, issue management) everywhere has decided that git is all that’s needed.

Not putting binaries in git isn’t a solution at all. Binaries are part of the source in many applications (e.g game assets, web site images...). Distributing every version of every binary to everyone is also not a solution.

Re:Is Git Irreplaceable? (2019) by jnurmine on Tuesday January 07, 2020 @10:55AM (#21981114)
Maybe for your particular problem it's worthwhile to setup a CM policy for the (topic) branch naming. For example in your case something like: topic/alkonaut/version-1.0/foo or topic/alkonaut/master/bar.

Or use something like: git log --all --graph --oneline

One tip for "zigzag spiderweb" is to always rebase your topic branch to the target branch prior to a fast-forward merge to the target branch (e.g. master). To clarify: while in your branch topic/foobar: "git rebase master", "git checkout master", "git merge --ff-only topic/foobar".

(There's surely a clever shorthand for the above procedure but when it comes to the command line, I like to combine small things instead of complicated memorized things, it's some kind of Lego syndrome)

Re:Is Git Irreplaceable? (2019) by alkonaut on Tuesday January 07, 2020 @02:59PM (#21984125)
Rebase + FF solves the spiderweb problem by removing the branches. But some insist on keeping the branches and I don’t get why a “git log” doesn’t have (and default) to showing important branches as straight lines.

Also with dozens of tiny commands but only a handful of actual desired outcomes, the high operations should be explicit commands. E.g “rebase this branch on master and then squash it and commit on master”.

A lot of the local/remote could also be hidden. The number of times I want to rebase on my local master which is behind origin by 2 commits is... zero.

Re:Is Git Irreplaceable? (2019) by lrem on Tuesday January 07, 2020 @02:04PM (#21983399)
Said 80/20 was the idea behind Fossil, along the "easy to learn because similar to svn". Seemed a good idea. But lost to having a famous user, which the Linux kernel obviously is.
Re:Is Git Irreplaceable? (2019) by baud147258 on Tuesday January 07, 2020 @06:23AM (#21978952)
If its interface is not simple and elegant, I don't see how you can call git simple and elegant, since it's how all users will interact through the interface. And personally I prefer a VCS with less ways to shoot myself in the foot than git.
Re:Is Git Irreplaceable? (2019) by mschaef on Tuesday January 07, 2020 @07:49AM (#21979434)
> If its interface is not simple and elegant, I don't see how you can call git simple and elegant, since it's how all users will interact through the interface.

At least in my experience, the interface makes a lot more sense if you understand the underlying data structure, which does have a certain elegant simplicity. (Even if it doesn't work quite the same as traditional source code control systems. Failing to work with directories is a problem of the git approach. Having a nice offline story is a distinct advantage.)

> And personally I prefer a VCS with less ways to shoot myself in the foot than git.

Oddly, the thing I love about git is how easy it makes it to recover from mistakes. Even if there are more ways to shoot yourself in the foot, there are also more ways to put your foot back exactly the way it was before you shot it. (If only real life worked that way!) This is what the immutable content storage under the hood of a git repository gets you.

If you know the commit hash (and there are a bunch of ways to easily keep track of these), you can get back to the state that's represented by that hash. Commands like merge/rebase/cherry-pick make this particularly easy by providing an '--abort' option that means "I've screwed this operation up beyond repair and need to bail out." And the abort works. As long as you had your target state committed, you can get back to it. (And if that's just a transient state that you don't want to persist, it's easy enough to squash it into something coherent.)

Re:Is Git Irreplaceable? (2019) by baud147258 on Tuesday January 07, 2020 @08:38AM (#21979768)
>the interface makes a lot more sense if you understand the underlying data structure

Except that I don't have to understand the underlying data structure to use a more basic VCS like Mercurial. What makes git so special that I would have to do that before being able to use it?

And for recovery from mistakes, I meant stashing the changes somewhere, deleting the repository and downloading a clean copy to start again, which I had to do a few times with Git and never with Mercurial (I might had to do it once or twice with SVN, though).

Re:Is Git Irreplaceable? (2019) by mschaef on Tuesday January 07, 2020 @10:11AM (#21980610)
> Except that I don't have to understand the underlying data structure to use a more basic VCS like Mercurial. What makes git so special that I would have to do that before being able to use it?

I don't think it is special. Generally after a while using a given tool, library, etc. I find it useful to dig in a bit and see what's happening under the hood to help understand why it works the way it does. git just happens to be the tool under discussion at the moment.

> And for recovery from mistakes, I meant stashing the changes somewhere, deleting the repository and downloading a clean copy to start again, which I had to do a few times with Git and never with Mercurial (I might had to do it once or twice with SVN, though).

I think we're talking about the same sort of mistakes. It's hard for me to imagine a case where you'd need to blow away a local git repository entirely. Worst case scenario, there should be good refs available in a remote that are just a 'git fetch' away. (If there's no remote, then blowing away the local repo is essentially just starting from scratch anyway.)

Re:Is Git Irreplaceable? (2019) by ldiracdelta on Tuesday January 07, 2020 @08:50AM (#21979835)
You also don't have to understand the underlying structure for a similarly powerful DVCS like bitkeeper. Yes, it isn't open source, but git was a major step back in usability for my group from bk to git.
Re:Is Git Irreplaceable? (2019) by cmrdporcupine on Tuesday January 07, 2020 @09:08AM (#21979993)
Yes, this. I actually tried bk before git, and actually used bazaar and then mercurial before git as well. I was stunned at how arcane the UI in git was made (And how arrogant the community of users around it could be, too). Bk was clean and elegant frankly. I'm no idiot when it comes to the concepts -- but git's CLI interface is just awful.

Bitkeeper is in fact open source now, BTW. Too late, but it is.

Re:Is Git Irreplaceable? (2019) by ldiracdelta on Tuesday January 07, 2020 @10:00AM (#21980496)
You're right. The arrogance was hilarious. People with no experience with bk saying, "What's your problem?" Now, git is super fast, because its core is written by Linus, but I think he is just so much better technically and so far into the internal weeds of Linux for so long in so many areas that he had trouble creating an API for mere mortals.
Re:Is Git Irreplaceable? (2019) by mschaef on Tuesday January 07, 2020 @09:16AM (#21980055)
> git was a major step back in usability for my group from bk to git.

What does that mean in concrete terms? What are the failures you're seeing with git that you weren't with bk? How long has your team used git? bk?

Re:Is Git Irreplaceable? (2019) by ldiracdelta on Tuesday January 07, 2020 @09:21AM (#21980096)
We used bk when I was with the group for 3 years and then switched to git. Been using git for 8 years. I know git, but the ergonomics and basic English semantic meaning of commands is much worse. I have to look up git commands and subflags _all_ the time still for checking out old versions of files to a new file. Looking at tags. Commiting to a new branch, et c. Bk's version of gitk was superior and the usage was nicer. I've used mercurial, svn, cvs, git, and bk. Git is hard, but it is the standard now, so of course I'll continue to embrace it. Just not as ergonomic.
Re:Is Git Irreplaceable? (2019) by coldpie on Tuesday January 07, 2020 @07:59AM (#21979496)
> At least in my experience, the interface makes a lot more sense if you understand the underlying data structure, which does have a certain elegant simplicity.

Yeah. Take an afternoon to read through gittutorial(7), gittutorial-2(7), and gitcore-tutorial(7). Git is a tool, and just like any other tool (car, tablesaw), you will be much better off if you take the time to learn to use it properly. Once you see "The Matrix" behind Git, it becomes an incredibly easy to use and flexible tool for managing source code and other plaintext files.

Re:Is Git Irreplaceable? (2019) by baud147258 on Tuesday January 07, 2020 @09:00AM (#21979914)
The fact that you put Git in the same category as tools having a potential of inflicting grievous bodily harm if misused is telling. And why does Git require this whereas other VCS don't? Mercurial was incredibly easy to use nearly right out of the gate, not after an afternoon of work.
Re:Is Git Irreplaceable? (2019) by coldpie on Tuesday January 07, 2020 @09:13AM (#21980033)
> The fact that you put Git in the same category as tools having a potential of inflicting grievous bodily harm if misused is telling.

They're just examples of tools.

> Mercurial was incredibly easy to use nearly right out of the gate, not after an afternoon of work.

I talk about this elsewhere in this thread, but I disagree with this assertion. I find Mercurial baffling and Git very elegant, though it could be an artifact of the order in which I learned the tools.

Re:Is Git Irreplaceable? (2019) by mschaef on Tuesday January 07, 2020 @09:18AM (#21980074)
> And why does Git require this whereas other VCS don't?

It doesn't. It just works better when you take the time to learn how it works. (Which is an experience I commonly have with the tools I use, for whatever that's worth.)

Re:Is Git Irreplaceable? (2019) by chiefalchemist on Tuesday January 07, 2020 @06:58AM (#21979138)
Agreed. If the applications we built using git were as awkward as git...our users and clients would scream, or worse.
Re:Is Git Irreplaceable? (2019) by P_I_Staker on Wednesday January 08, 2020 @04:41PM (#21996098)
I don't understand the relevance of git in all of that
Re:Is Git Irreplaceable? (2019) by munmaek on Tuesday January 07, 2020 @10:04AM (#21980532)
You can almost always recover from your mistakes with git reflog.
Re:Is Git Irreplaceable? (2019) by P_I_Staker on Wednesday January 08, 2020 @04:45PM (#21996128)
Yes and no. I'm a git guy and a fan, but you can really, really mess things up. Usually, this is only when using features like force push; however, there are arguably legitimate use cases for that.

Buddy had a teammate that almost force pushed references from a slightly different repo. What a mess that could have been! I agree regarding the usefulness of reflog, and think the complaints about messing things up with rebase, reset, ect are overblown. It really isn't an issue for intermediate users.

Re:Is Git Irreplaceable? (2019) by munmaek on Wednesday January 08, 2020 @07:06PM (#21997155)
Hence almost always. It’s not a common situation to delete commits from history, etc.

I don’t see the capability to force push as a negative. There are situations in which it’s necessary, like forcibly removing history (something I had to do just today).

Git gives you the ability to shoot yourself in the foot, so it’s up to the operator to not make a mistake like that without backing up the repo to a different place first, etc. Something something only a poor carpenter blames their tools.

Re:Is Git Irreplaceable? (2019) by tomesch1982 on Tuesday January 07, 2020 @04:49AM (#21978470)
Git is neither easy not is it really elegant. It is useful for projects like Linux™ but for the vast majority of projects way better tools like mercurial or fossil would be a much better fit.
Re:Is Git Irreplaceable? (2019) by barrkel on Tuesday January 07, 2020 @07:39AM (#21979366)
After svn, git was a breath of fresh air; far easier to use and reason about, not to mention much faster.

I don't think much of your all-in-one solution like fossil - that's a competitor for GitHub (without the bits that make GH good), not git.

I tried to use hg at one point in the early days, and found it much slower than git. Git's low latency for commands made a substantial difference, perceptually. In principle I think git encourages too much attention to things like rebases, which fraudulently rewrite history and lie about how code was written, just so the diff history can look neater. Working code should be the primary artifact, not neat history, and rebases and other rewrites make it too easy to cause chaos with missing or duplicated commits in a team environment. So ideologically, mercurial is a better fit, but that's not enough to make me use it.

Fit is a function of an environment; when we say survival of the fittest, we mean fitness as adapted to an environment. Feature set isn't the only aspect; at this point, the network effects of git are insurmountable without a leap forward in functionality of some kind.

(I think git & hg are just as elegant as one another; to me, the elegance is in the Merkle tree and the conceptual model one needs to operate the history graph.)

Re:Is Git Irreplaceable? (2019) by jat850 on Tuesday January 07, 2020 @09:11AM (#21980015)
Can you explain what you mean by fossil being a competitor for github, rather than git? Fossil is a scm with additional features for usage, but (the last I used it, and to my memory) it was just the command line fossil very much like git, and that's how I used it.

What makes it the case that fossil cannot be a competitor to git (or hg), in that they are both a vcs?

edit I haven't had a lot of sleep. What I'm trying to ask, I suppose, is why can't you use fossil just like git and ignore any all-in-one features it provides? (This is not to comment on how good, scalable, fast, correct, or robust it is.)

Re:Is Git Irreplaceable? (2019) by wyoung2 on Tuesday January 07, 2020 @09:47AM (#21980354)
You can, though I suspect the OP's focus on speed means you'd want to turn off Fossil's autosync feature, which makes it operate more like Git: checkins go only the local repository initially, and then you must later explicitly push them to the repo you cloned from.

This is why Subversion was "slow": your local working speed was gated by the speed of the central repo, which could be slow if it was under-powered or overloaded, as was common with the free Subversion hosts of the day. At least with Git, you can batch your local changes and push them all at some more convenient time, such as when you were going off for a break anyway.

Re:Is Git Irreplaceable? (2019) by peteretep on Tuesday January 07, 2020 @05:03AM (#21978537)
> way better tools

I work with a group of people who all know enough git that we're productive, and a few of us know enough git to solve complicated problem.

I've not seriously considered fossil or mercurial -- what are the top three tangible benefits I'd get from them getting our team to switch?

Re:Is Git Irreplaceable? (2019) by rkangel on Tuesday January 07, 2020 @07:57AM (#21979486)
I have never used Fossil, but I used to be a strong proponent of Mercurial. My advice is don't - Mercurial lost, git has won, and fighting against the current is just going to make your life harder.

The main advantage Mercurial has over git is a command line syntax that makes consistent sense. The operations you want to do are easy and as you try and do more complicated things, the new commands will be unsurprising and predictable. If you already know how to use git then this advantage is (mostly) irrelevant.

There are some other features that are interesting - Mercurial has a couple of different types of branches. Bookmarks are like git branches, whereas named branches are a completely different concept which can be useful. 'Phases' tracks whether commits have been shared, and prevents you rewriting (rebasing) them when appropriate.

If you do experiment, note that many 'power user' features are turned off by default. There is a robust extension system, and the default mercurial installation includes a load of standard ones. My config file includes the following to turn on some useful stuff ('record' is the most useful for a staging area like facility):

[extensions] pager = color = convert = fetch = graphlog = progress = record = rebase = purge =

Re:Is Git Irreplaceable? (2019) by coldpie on Tuesday January 07, 2020 @08:09AM (#21979573)
I know Git inside and out, but I had to use Mercurial for a client a couple years ago. I found it to be the most baffling and nonsensical source control experience of my life. It might be a case of cross-contamination. Like you said, each SCM uses similar terms for different concepts, so my Git knowledge may have unfairly colored how I expected similar terms to work in Mercurial.

But stuff like: "hg log" gives you _every commit in the repo_?? When is that ever useful? How do I get only the commits that lead to the current state of the repo? Mercurial doesn't have branches; instead you're supposed to _copy the whole directory_[1] at the filesystem level?? Of course this is ridiculous, so they invented "bookmarks" which are actually Git branches. The extensions thing you mention is also a ridiculous chore. Just have sane defaults. I also found hg's output very dense and hard to understand and read, poorly suited for human consumption.

I dunno. I'm sure Mercurial is fine, many people use it every day, and likely my strong Git bias was affecting my ability to learn Mercurial. But I found it far easier to just clone into Git, use Git to do source control, and then export back to Mercurial when I'm ready to share my work.

[1] https://www.mercurial-scm.org/wiki/TutorialMerge

Re:Is Git Irreplaceable? (2019) by rkangel on Tuesday January 07, 2020 @08:37AM (#21979760)
Mercurial does absolutely not require you copying at the fs level. You're not the first person to be caught out by that tutorial, which I think would serve us best by being deleted.

The 'original' branching method for Mercurial is called Named Branches. The big difference with Git is that every commit is labelled with what branch it is on. This has advantages - if you imagine looking at the train track of 'master' in git with it's divergence for a few commits and then merge, you can see that the 3 commits were on a branch called 'performance', whereas with git that history is completely lost. See: https://www.mercurial-scm.org/wiki/NamedBranches

As usage of git grew, the git branching model gained popularity and so the Mercurial bookmarks extension was created (https://www.mercurial-scm.org/wiki/Bookmarks).

It can be seen as a downside that there are two branching options that you have to choose between.

Re:Is Git Irreplaceable? (2019) by coldpie on Tuesday January 07, 2020 @08:59AM (#21979906)
It's not just that tutorial, see also [1,2]. I think this is/was really an "official" way to do branching, and it seems utter madness to me :)

[1] Sadly the popular hginit.com seems dead, this was my first introduction to Mercurial. https://web.archive.org/web/20180722012242/http://hginit.com...

[2] https://stevelosh.com/blog/2009/08/a-guide-to-branching-in-m...

Re:Is Git Irreplaceable? (2019) by jordigh on Tuesday January 07, 2020 @09:57AM (#21980453)
Branching by cloning was copied from bitkeeper. It was also early git's only branching mechanism. If you listen to Linus's talk when he introduced git at Google, you'll hear him conflate "branch" with "clone" because that's what he was thinking of at the time.

https://www.youtube.com/watch?v=4XpnKHJAok8

Re:Is Git Irreplaceable? (2019) by rkangel on Tuesday January 07, 2020 @09:05AM (#21979958)
I associate that particular madness with Bazaar rather than Mercurial. It stopped being standard practice a while ago, and those old tutorials should be updated or removed.
Re:Is Git Irreplaceable? (2019) by tomesch1982 on Tuesday January 07, 2020 @05:26AM (#21978667)
That is exactly the point. For git you need the ecosystem to cope with it's shortcomings and in addition some experts to help you out of the pickles this software gets you into.

I mainly use fossil for personal projects.

Whats nice about it is that it not only is a very capable VCS but also a complete project management tool with tickets/issues, wiki, blog, mailing list and user management. The setup is ridiculously easy and everyone always has everything in the repository.

In addition fossil never looses data, unlike git which can easily destroy branches that are not pushed, delete stuff while stashing or unstashing, delete stuff when rebasing and so on.

And fossil has a sane command-line interface so that everyone in the team is expert enough to work with it. No need for heroes that save the day from git fricking everything up.

Re:Is Git Irreplaceable? (2019) by LaGrange on Tuesday January 07, 2020 @06:52AM (#21979099)
> Whats nice about it is that it not only is a very capable VCS but also a complete project management tool with tickets/issues, wiki, blog, mailing list and user management.

That is not nice. That is way more things that might not match me, more attack surface, more irrelevant cruft I'll probably have to look up how to disable. Project management, wiki and issue tracking preferences are very personal and often don't map particularly well to specific repositories. And _blog_ and _mailing list_? Why, you're spending time on stuff most of your users will hate, not because it's bad, but because they either don't need it or would like it different.

> In addition fossil never looses data, unlike git which can easily destroy branches that are not pushed, delete stuff while stashing or unstashing, delete stuff when rebasing and so on.

Which is why Git is successful. That's by design, not accident. We want to, and sometimes _have to_, delete stuff.

Re:Is Git Irreplaceable? (2019) by ginko on Tuesday January 07, 2020 @08:29AM (#21979687)
>Whats nice about it is that it not only is a very capable VCS but also a complete project management tool with tickets/issues, wiki, blog, mailing list and user management.

That seems like feature creep.

Re:Is Git Irreplaceable? (2019) by wyoung2 on Tuesday January 07, 2020 @09:59AM (#21980477)
Not at all. There's a lot of nice stuff that falls out of Fossil's integration of these features, things which you don't get when you lash them up from separate parts.

For example, if I have a check-in comment "Fixes [abcd1234]" I get an automatic link from that check-in comment to ticket abcd1234 from the web UI's timeline view. If I then close that ticket, the comment in the timeline view is rendered in strikethrough text, so I don't have to visit the ticket to see that it's closed.

Similarly, a built-in forum means the project's developers can discuss things with easy internal reference to wiki articles, tickets, checkins...

A recent feature added to Fossil is the ability to have a wiki article bound to a particular check-in or branch, so that whenever someone views that artifact in the web UI, they get a link to the ongoing discussion about it. This is useful when you have more to say about the check-in or branch than can reasonably fit into a comment box. This solves a common problem with experimental features, where you want to discuss it and evolve the idea before it's merged back into the parent branch.

Fossil's user management features are also highly helpful.

    http://fossil-scm.org/fossil/doc/trunk/www/caps/
With raw Git (no Github, GitLab, etc.) it's pretty much all-or-nothing, but with Fossil, you can say "this user can do these things, but not these other things." Thus you can set up a public project, giving anonymous users the ability to file tickets and read the forum but not make check-ins.

These features are as seductive as what Github, GitLab, BitBucket, etc. add to Git, but whereas those are all proprietary services with some of the roach hotel nature to them, with Fossil, you clone the repo and now you've got all of that locally, too. If the central repo goes down, you can stand your local clone up as a near-complete replacement for it.

It's not 100% because Fossil purposely doesn't clone a few things like the user table, for security reasons. You can build a new user table from the author names on the check-ins, though.

Re:Is Git Irreplaceable? (2019) by imtringued on Tuesday January 07, 2020 @10:09AM (#21980591)
>In addition fossil never looses data, unlike git which can easily destroy branches that are not pushed, delete stuff while stashing or unstashing, delete stuff when rebasing and so on.

I have created a lot of feature branches that contain useless commits which I then later corrected with a simple git merge --squash. Preserving those commits sounds like a drag.

Re:Is Git Irreplaceable? (2019) by wyoung2 on Tuesday January 07, 2020 @11:37AM (#21981548)
You're making bisects, cherry-picks, and backouts harder by squashing history like that.

We cover this and more in the Fossil project document "Rebase Considered Harmful": https://fossil-scm.org/fossil/doc/trunk/www/rebaseharm.md

Re:Is Git Irreplaceable? (2019) by mcv on Tuesday January 07, 2020 @05:47AM (#21978778)
I hadn't heard of fossil yet, but I'll definitely look into it.
Re:Is Git Irreplaceable? (2019) by wyoung2 on Tuesday January 07, 2020 @10:04AM (#21980536)
The simplest way to do that is to just use it for a local project. Say, you local ~/bin directory, containing your local scripts, or your editor's config files that you want sync'd everywhere, or a novel you're writing on the side.

If you're like me, you'll find yourself increasingly wonder, "Why would I put up with Git any time I'm not forced to by some outside concern?"

Re:Is Git Irreplaceable? (2019) by ehnto on Tuesday January 07, 2020 @04:57AM (#21978508)
It's been immensely useful in every software project I have ever partaken in. None of them were like linux.
Re:Is Git Irreplaceable? (2019) by mcv on Tuesday January 07, 2020 @05:43AM (#21978755)
It is immensely useful. That doesn't mean that some other tool might not be better for most cases.

I love git, and don't know most other post-SVN version control systems, but I do recognise the complaints people have about git. There's clearly still room for improvement.

Re:Is Git Irreplaceable? (2019) by reagent_finder on Tuesday January 07, 2020 @05:56AM (#21978817)
What?

To use git you need to know clone, pull, commit, push. For larger projects branch and merge. Those fall into a lot of boxes that say "easy" or "elegant," and I really wouldn't hesitate to recommend git to a lot of projects, big or small, discounting specific needs, but I guess you've got some specific concerns that really don't translate well into simple statements.

I've used mercurial only to get some external requirements or tools going, and never used fossil. Could you elaborate a bit on why git is worse than either of them and why I should consider switching ?

Re:Is Git Irreplaceable? (2019) by the_af on Tuesday January 07, 2020 @10:10AM (#21980602)
> To use git you need to know clone, pull, commit, push. For larger projects branch and merge

What if you committed to the wrong branch? What if you tried to merge commits from another user and made a mess of it all? What if you pushed something you want to roll back? What if you committed with the wrong commit message and want to fix it? What if you followed the policy of "commit often" but ended up with lots of irrelevant commits, and want to fix this so that it only has meaningful commits. How can you find who committed what? Or which branches contain a commit?

I know how to do all of this. But these are genuine questions a user of git will need to get answered, and git quickly becomes confusing/inconsistent once you're off the "happy path".

Re:Is Git Irreplaceable? (2019) by tsimionescu on Tuesday January 07, 2020 @12:01PM (#21981835)
You need to know much more to use git in anything involving more than one branch. You need to know git checkout, git stash, you need to know how to fix conflicts, you need to know rebase vs merge and how to understand git log when you use merge, you need git reset, you probably need git cherry pick occasionally.

One of the major day to day annoyances is the fact that (by default) I can't work on multiple branches without committing or stashing all the time, since switching branches, instead of being a simple 'cd' like in other VCSs is instead a destructive operation on my entire repo (also causing re-indexing for all content-aware tools...). And if I want the normal behavior? I need to learn some other commands to set that up, and learn their filesystem restrictions...

Re:Is Git Irreplaceable? (2019) by P_I_Staker on Wednesday January 08, 2020 @04:40PM (#21996092)
Disagree. I could teach a child to use git. I don't agree it's elegant in a face value way. Yet if you've used other version control systems, git has features that you'd dream of (I "invented" some of the features of git on my own). So in a way it really is an elegant solution. I can't think of much that I really hate, or wish to change; and I can't think of any serious proposal to "fix" it.
Re:Is Git Irreplaceable? (2019) by matsemann on Tuesday January 07, 2020 @04:22AM (#21978350)
People have probably been happy with their tools for centuries. Just because one cannot imagine something better doesn't mean there's no possibility for it to exist. If anything, this defeatist attitude may prove the author right.
Re:Is Git Irreplaceable? (2019) by tazjin on Tuesday January 07, 2020 @04:27AM (#21978369)
> defeatist attitude

This implies that the parent's sentiment about git is negative.

At least I personally feel very positively about git and am not missing much from it.

Re:Is Git Irreplaceable? (2019) by matsemann on Tuesday January 07, 2020 @04:44AM (#21978439)
> This implies that the parent's sentiment about git is negative.

No, I meant defeatist as in "I have given up finding something better as it will never exist".

Re:Is Git Irreplaceable? (2019) by n0rbwah on Tuesday January 07, 2020 @04:50AM (#21978474)
If the tool you have works well for your use case, looking for and learning to use a "better tool" can be a waste of your time with little benefit.
Re:Is Git Irreplaceable? (2019) by madmulita on Tuesday January 07, 2020 @04:58AM (#21978517)
And that's how you can get stuck in a local maximum.
Re:Is Git Irreplaceable? (2019) by SketchySeaBeast on Tuesday January 07, 2020 @09:37AM (#21980250)
With the exception of very very singular people, isn't every maximum going to be local? Even then they'll be stuck in a bunch of other local maximum's outside their own area of expertise.
Re:Is Git Irreplaceable? (2019) by matsemann on Tuesday January 07, 2020 @04:55AM (#21978495)
Maybe, but that has nothing to do with my point.
Re:Is Git Irreplaceable? (2019) by rimliu on Tuesday January 07, 2020 @05:14AM (#21978614)
I remember what was the go-to tool before git. It was Subversion. And CVS before that. I would not say people were happy with those tools.
Re:Is Git Irreplaceable? (2019) by mcv on Tuesday January 07, 2020 @05:53AM (#21978798)
I was happy with SVN because I used CVS before. I was even happy with CVS, because I had nothing before. It's hard to imagine now.

Software development has seen massive improvements in the past 20 years. I see no reason why that would stop now.

Re:Is Git Irreplaceable? (2019) by tialaramex on Tuesday January 07, 2020 @07:05AM (#21979165)
Asymptotes. Sometimes it turns out we can solve a particular problem so comprehensively that "solve this problem better" is never a reasonable step. You can try it anyway, of course, but you're unlikely to get acknowledgement much less praise.

The answer to "Why doesn't my music sound as good as I wanted?" isn't going to be "CD's 44.1kHz and 16-bit PCM isn't enough". It might be "This cable has been chewed by a dog" or "These speakers you got with a cheap MIDI system in your student dorm are garbage" or even "the earbuds you're wearing don't fit properly" but it won't be the 44.1kHz 16-bit PCM.

Likewise, it is plausible that Git is done technology-wise. That doesn't mean there won't be refirements to how it's used, recommended branching strategies, auto-complete, or even some low-level stuff like fixing the hash algorithm - but the core technology is done.

Re:Is Git Irreplaceable? (2019) by bitwize on Tuesday January 07, 2020 @08:16AM (#21979614)
> The answer to "Why doesn't my music sound as good as I wanted?" isn't going to be "CD's 44.1kHz and 16-bit PCM isn't enough".

Yeah, try telling this to a fan of 1960s or 1970s rock. You'll get an earful about rich guitars and fat synths, which only a 100% analog, tube-amp process from studio to ear is capable of replicating.

Re:Is Git Irreplaceable? (2019) by wolrah on Tuesday January 07, 2020 @01:07PM (#21982661)
> Yeah, try telling this to a fan of 1960s or 1970s rock. You'll get an earful about rich guitars and fat synths, which only a 100% analog, tube-amp process from studio to ear is capable of replicating.

And anyone with a basic understanding of electronics should laugh in the faces of these people. The idea that a signal can be carried on a wire or recorded on tape but can not be replicated digitally is absolute nonsense.

If someone wants to claim that their preferred format captures higher frequencies than 44.1kHz sampling allows for, that's at least plausible, but that can be solved by using higher sampling rates like 96 or 192 kHz. At that point you've exceeded the capabilities of all mainstream analog storage media.

If they are looking for specific effects created when pushing the limits of analog hardware, like the "crunch" of a tube amp, that's fine too, but they need to acknowledge that they're treating the amp as an instrument in that case and its output can still be recorded digitally just fine.

Re:Is Git Irreplaceable? (2019) by matsemann on Tuesday January 07, 2020 @05:55AM (#21978809)
I was happy copying my files back in the days for versioning (final_draft, final_draft01, final_draft_absolute_final, final_draft_use_this_one), but that was because I didn't know of anything better. What I'm saying is that even though we don't see it now, there's probably something better out there waiting to be discovered.
Re:Is Git Irreplaceable? (2019) by yodsanklai on Tuesday January 07, 2020 @04:47AM (#21978460)
I hope it's the last DVCS, if it can save me the hassle of learning a new one. There is some learning curve, but it works just fine once you know how to use it.
Re:Is Git Irreplaceable? (2019) by javajosh on Tuesday January 07, 2020 @05:05AM (#21978555)
Over time you realize there are no transient states. You cannot neglect, for example, complex install just because it "happens once". Nothing ever happens just once. You will always have to reinstall, probably multiple times. So when people say the same thing about installation complexity, they are being naive.

In the same way, learning is not a transient state either. You will always have to relearn. Those impossible barriers that you eventually got through will reduce to speedbumps - but they will always be there, slowing you down. And if you don't use it enough, you'll have to relearn.

Also, be aware that once you've climbed a learning curve, at least unconsciously you are no longer incentivized to simplify it for those who come after. Why reduce the barrier-to-entry for others, after all? You got through it, so why can't they? And this is why generations of kids learn bad music theory, and generations of physicists learn bad particle names. It's important to be aware of this effect so you can counter-act it.

Re:Is Git Irreplaceable? (2019) by mschaef on Tuesday January 07, 2020 @07:52AM (#21979454)
> I hope it's the last DVCS,

The only reason I'd disagree is if the next source code control system were somehow as much an improvement over git as git was over its predecessors.

> if it can save me the hassle of learning a new one.

Not to mention the hassle of converting all those legacy repositories, converting CI/CD, etc.

Re:Is Git Irreplaceable? (2019) by vnorilo on Tuesday January 07, 2020 @08:08AM (#21979564)
After using darcs, I can never see Git as elegant, no matter how clearly it is a more pragmatic choice these days.
Re:Is Git Irreplaceable? (2019) by matt-attack on Tuesday January 07, 2020 @12:33PM (#21982209)
I agree. I’m always embarrassed to say that I still use darcs but it’s just entirely obvious how to use it. There is no mystery. The choice to prompt the user for thing makes usability insanely high.

Yes it’s slow for large projects but honestly I just deal with that.

Re:Is Git Irreplaceable? (2019) by cjallen88 on Thursday January 09, 2020 @03:30AM (#21999467)
Have you looked at Pijul? I understand it has resolved the major shortcomings of Darcs.
Re:Is Git Irreplaceable? (2019) by phkahler on Tuesday January 07, 2020 @08:16AM (#21979618)
>> The possibility of git being the last mass-market DVCS within my lifetime leaves me with warm fuzzy feelings.

Agreed. Technology should converge on a best solution so we can stop chasing things and get work done. Stable open source standard solutions are what we need more of.

Some anti-pattern examples are C++ and Vulcan.

Re:Is Git Irreplaceable? (2019) by stcg on Tuesday January 07, 2020 @01:38PM (#21983046)
> Some anti-pattern examples are C++ and Vulcan.

Are you referring to the Vulkan API? If so, why do you see it as an anti-pattern example?

I like the API and I think it is a great and necessary improvement over OpenGL. I actually hope to see Vulkan become the ‘stable open source standard solution’ for graphics.

Re:Is Git Irreplaceable? (2019) by phkahler on Tuesday January 07, 2020 @06:15PM (#21986307)
Maybe I should have said OpenGL since it keeps getting new versions. Does Vulcan? It just seems like kronos keeps moving the target.
Re:Is Git Irreplaceable? (2019) by anoncake on Tuesday January 07, 2020 @06:00PM (#21986159)
You want technology to converge without changing? That's impossible.
Re:Is Git Irreplaceable? (2019) by oswamano on Tuesday January 07, 2020 @09:11AM (#21980020)
Honestly if we can reduce the tooling churn for development that sounds great
Re:Is Git Irreplaceable? (2019) by baq on Tuesday January 07, 2020 @04:56AM (#21978504)
here's me sincerely hoping for pijul and/or darcs to deliver something much better. (obviously if it's only a little better then there isn't much point in switching.)
Re:Is Git Irreplaceable? (2019) by supportlocal4h on Tuesday January 07, 2020 @09:26AM (#21980150)
I was hopeful for pijul. But the more time passes without any noticeable progress or traction the less hope I have.
Re:Is Git Irreplaceable? (2019) by Tade0 on Tuesday January 07, 2020 @08:31AM (#21979703)
To me it's proof that we as an industry finally arrived at a consensus over something.
Re:Is Git Irreplaceable? (2019) by richie_adler on Tuesday January 07, 2020 @10:01AM (#21980506)
Yeah, but it's like Betamax losing to VHS.
Re:Is Git Irreplaceable? (2019) by brylie on Tuesday January 07, 2020 @04:17AM (#21978327)
The interface is arguably the most important part. I.e. it is a tool developed for humans to use, so would ideally have simple, consistent, and by extension intuitive ergonomics. Elegance of internal implementation is secondary.
Re:Is Git Irreplaceable? (2019) by kortilla on Tuesday January 07, 2020 @04:24AM (#21978353)
The interface can be swapped out if the underlying storage is fine. There is nothing preventing you from writing a different front end where “checkout” doesn’t do all the things.
Re:Is Git Irreplaceable? (2019) by wyoung2 on Tuesday January 07, 2020 @10:10AM (#21980606)
Which is why there are dozens of Git front-ends, fragmenting the market, reducing the benefit of cross-training within a team. "Oh, you can't do that in your TortoiseStudioCodeThingy? I just right-click and select Frobnicate File, and it fixes all that!"

Thus editor wars, language wars...

Alternative: a tool like Fossil where the CLI is sensible from jump so the whole team doesn't replace it with something better, uniquely per team member.

Re:Is Git Irreplaceable? (2019) by baud147258 on Tuesday January 07, 2020 @06:31AM (#21978995)
> There is nothing preventing you from writing a different front end

Or you could just use a tool where the interface is fine out of the box

Re:Is Git Irreplaceable? (2019) by afiori on Tuesday January 07, 2020 @06:30AM (#21978984)
Yet no one is doing it.
Re:Is Git Irreplaceable? (2019) by P_I_Staker on Wednesday January 08, 2020 @04:36PM (#21996059)
Yup, doesn't sound like a negative to me. People will still try to build simpler ecosystems like GitLab/GitHub/Atlassian, with similarly mixed results.
Re:Is Git Irreplaceable? (2019) by kick on Tuesday January 07, 2020 @01:43PM (#21983127)
git is like a dozen Perl and shell scripts taped together with a tiny bit of Tcl on the side. It is nowhere near elegant. It's a monstrosity.