Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In this long rant, there is only one concrete thing named that is supposedly bad:

> I saw someone that was working on a few Git branches, twenty years my senior, and they decided to clone the entire repository ten times, then checkout a different branch in each repository clone "because it's easier". > Can you imagine the kind of havoc such a person could wreak upon infrastructure and code if left unchecked?

But I'm very confused, because this is the workflow paradigm of several VCSs that are not named Git. If this is their only concrete complaint, then I have to assume that this person has no idea what they're talking about.



Hello, hello, I am the original poster. I had surmised why this person was doing this, but didn't want to spend ages venting about a particular person, especially in a way that might actually cause that person to realize they're reading about themselves one day. Suffice it to say that there are other serious issues.

Here's a more concrete thing - I work on a product that took years and a spectacular sum of money to get going on the data space (all it does is land CSVs into S3 and then load them into a database every day, < 10GB per day). The original designers decided that the entire thing should be powered by spreadsheets, so we now have about 10 full-time staff editing spreadsheets that trigger build pipelines, one of which I believe has 400 separate worksheets in it.

However, you are right that, broadly speaking, I have no idea what I'm talking about. I have made peace with this.


Truth be told, I liked your article a lot but that particular example definitely should have been replaced with something more concrete and a bit more convincing.

Having several copies of a GIT repo for different branches is a viable strategy as long as one does not do force-pushes.


Yeah I do this on a daily basis. Sometimes I want to have two different branches open simultaneously. Maybe there’s some fancy git hackery to have two open workspaces from the same .git local repository. But you know what? My time to figure that out is worth more than the measly megabytes of saved disk space.


The official way to do this is using git worktrees[0], but, as you say, it may not be worth the time to learn if what you have is working for you.

[0] https://git-scm.com/docs/git-worktree


It's not even only that, when you switch to another worktree you catch your language server with its pants down, and some tooling e.g. test watchers are bugging out as well.

I just always found it cleaner to have several directories on the rare occasion I need to work on several branches almost in parallel.

And let's face it, most of us don't work in a repo that is 100GB or above. Even if it was a 10GB I wouldn't care one bit and can easily have 20 copies of it temporarily.


Lookup git worktrees. They are very easy to use and save you time since no matter how many you make you only need to fetch once. As an added bonus, someday you might be working on a project with 100gb repo and find that it makes a big difference.


Thank you for the feedback - I hammered this out over an hour this morning, and wasn't really expecting much readership but should have been more careful. As noted elsewhere on my blog, I'm young enough that I've only used Git, so it's good to know that the original example was not good. I read much too far into it given the other dysfunction I've seen from the same people.

In any case, I've made a speedy replacement.


> wasn't really expecting much readership but should have been more careful.

Fair enough but if you allow me to suggest you this: don't do it for the readership, do it for your own skills of eloquent and convincing writing. Even if nobody ever reads it, developing proper articulation and being exhaustive in your analysis will only make you smarter and better at what you do.

This is unsolicited advice though, and I apologize if it's misplaced.


This is a good example of why you shouldn't listen to the Hacker News peanut gallery, because it is about as silly as you originally implied it was; a tiny bit of documentation reading will let you know you can check out as many worktrees into different directories as you like.

I would advise you to instead eliminate class prejudice from your writing. A common type of class prejudicial remark programmers make is sniping at "spreadsheets", i.e., the programming tools of the outgroup not initiated into nonsensical programmer esoterica, aren't those nonprogrammers benighted and silly? But really, spreadsheets are so valuable to them because they're one of the only ways they can tell a computer (a machine that ostensibly serves them) what to do without interacting with the priesthood.

But you shouldn't listen to me either. I'm just some fucking moron on a website. Please understand this.


Re: Git usage

Your colleague, well, maybe you as well, could instead make use of 'git worktree'

https://git-scm.com/docs/git-worktree

It allows exactly that, use a single repo yet have parallel checkouts in separate directories.


I think that is besides the point. If there is no adequate enough training in the work flow or basic tooling concepts for employees such that this is what people are doing with git, there are probably serious problems afoot with best practices and productivity.


i see a lot of people doing this, and especially if theyre shallow clones, its really not a big deal

and anyway git-worktree is basically this workflow wrapped in nicer UX


Worktrees are super useful to avoid interrupting your work in progress when you need to load another branch to help someone debug something.


Ha. I typically stash and checkout the other branch or commit a wip that I’ll undo when I’m back and checkout the other branch.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: