385
Version Control (lemmy.blahaj.zone)
submitted 4 months ago by [email protected] to c/[email protected]
top 50 comments
sorted by: hot top new old
[-] [email protected] 44 points 4 months ago

That last one is more common than I'd like, a lot more

[-] [email protected] 10 points 4 months ago

$ cp -r src/ src.old

No sir never seen it in me life, honest to god sir

[-] [email protected] 8 points 4 months ago

Oh I used to do it as a kid

[-] [email protected] 38 points 4 months ago* (last edited 4 months ago)
cd ~/repos/work-project27
git checkout dev
git branch new_feature
### code for a few hours, close laptop, go to sleep, next morning
git checkout dev
### code for a few more hours, close laptop go to sleep, next morning
## "oh fuck, I already implemented this in new_feature but differently"
git checkout dev
git diff new_feature
## "oh no. oh no no no. oh fuck. I can't merge any of this upstream and my history is borked."
git clone git@workhub:work/work-project work-project28
cd ~/repos/work-project28
[-] [email protected] 16 points 4 months ago
[-] [email protected] 17 points 4 months ago

At university there were some students that want to manage projekts in could storange. That was just stupid but i didn't know it better at that time.

[-] [email protected] 47 points 4 months ago
[-] [email protected] 17 points 4 months ago* (last edited 4 months ago)

I'm sick...that's my excuse....

[-] [email protected] 16 points 4 months ago

Didn't want to be mean with the meme

[-] [email protected] 14 points 4 months ago

Don't worry, it's fun

[-] [email protected] 10 points 4 months ago

It's quantum stuff, I could do that, or I could not do that...

[-] [email protected] 13 points 4 months ago

The last is just a normal git workflow, isn’t it?

[-] [email protected] 2 points 4 months ago

I'm pretty sure it means, they copy and paste the project file and iterate the version number manually.

[-] [email protected] 12 points 4 months ago

the last one is just immutability, praised in modern JS / TS, albeit at the repo level

[-] [email protected] 16 points 4 months ago

I "love" how JavaScript has slowly rediscovered every piece of functional programming wisdom that was developed before 1980.

[-] [email protected] 2 points 4 months ago

Kind of, though they honestly just do pretend immutability. Object references are still copied everywhere.

[-] [email protected] 5 points 4 months ago

All of javascript is kinda just pretend.

[-] [email protected] 2 points 4 months ago

I find you need the whole ecosystem to support immutability to make it work. Every library needs to be based around it. Elixir is about the only modern option that does.

[-] [email protected] 10 points 4 months ago

Why did you mention git twice?

[-] [email protected] 5 points 4 months ago

While TFS did support Git, I had to deal with the much worse TFVC for a long while, up until Azure DevOps came along.

[-] [email protected] 7 points 4 months ago* (last edited 4 months ago)

It’s actually a pretty good idea to have a full system snapshot time to time, where the project can compile successfully, for future Virtual Machine use. It’s usually easier to spin a VM than setting up the whole dev environment from scratch.

[-] [email protected] 7 points 4 months ago

MyProject - Copy v2.bak new NEW (3)/

[-] [email protected] 3 points 4 months ago

And when it’s release, then you rename it to

MyProject - Copy v2.bak new NEW (3) FINAL.2-19-24/

and then at the next standup, we all ponder how we can rename it to

MyProject - Copy v2.bak new NEW (3) FINAL.2/19/24/

because the team lead needs m/d/yy names with forward slashes

[-] [email protected] 6 points 4 months ago

Git is so ready to understand, that I don't understand how people work without it.

[-] [email protected] 5 points 4 months ago

It's one of those things that's hard to really understand why it's so useful, until you actually use it.

[-] [email protected] 6 points 4 months ago* (last edited 4 months ago)

As one of the maintainers of Mercurial, I take great offense in this meme. ;)

[-] [email protected] 5 points 4 months ago

It’s definitely up with Git in my opinion. I much prefer the branching in Mercurial.

It’s certainly very offensive to lump it in the same band as SVN and TFVC.

[-] [email protected] 5 points 4 months ago

What could possibly be preferrable to git switch -c <branchname>?

[-] [email protected] 2 points 4 months ago

It’s not the mechanism of branching that I prefer.

It’s the fact that Mercurial tags the commit with the name of the branch that it was committed to which makes it much easier to determine whether a commit is included in your current branch or not.

Also, Mercurial has a powerful revision search feature built in which I love (https://www.mercurial-scm.org/doc/hg.1.html#revisions).

[-] [email protected] 3 points 4 months ago

I admit that I have been bitten by the fact that commits don’t have a “true home branch”.

[-] [email protected] 2 points 4 months ago

It’s the fact that Mercurial tags the commit with the name of the branch that it was committed to which makes it much easier to determine whether a commit is included in your current branch or not.

Isn't this trivial in Git too? git branch --contains COMMIT ?

load more comments (1 replies)
[-] [email protected] 4 points 4 months ago

Given that Git and Mercurial were both created around April 2005 to serve the same purpose by very similar people for the same reason... I'd say it's fair!

[-] [email protected] 5 points 4 months ago
cp $fic $fic.$(date -Iseconds)
git commit -a -m "save at $(date -Iseconds)"
# edit $fic
git commit -a -m "save at $(date -Iseconds)"
git push -f
[-] [email protected] 4 points 4 months ago

Couldn't add perforce to the list because someone else was checking it out, I see.

[-] [email protected] 4 points 4 months ago
[-] [email protected] 1 points 4 months ago

With properly configured subvolumes, I'll allow it.

[-] [email protected] 1 points 4 months ago

Isn't that just git with more steps and harder to share?

[-] [email protected] 2 points 4 months ago

It's equivalent to cp -r, but:

  • the copy is read-only
  • reuses unchanged files
  • easier to share (btrfs sub send)
[-] [email protected] 1 points 4 months ago

Sounds just like git (unless you do some special operations to change the copies)

[-] [email protected] 4 points 4 months ago

And worse than all of those options is Visual Sourcesafe.

[-] [email protected] 3 points 4 months ago

Fox Pro!

Shrug

[-] [email protected] 3 points 4 months ago* (last edited 4 months ago)

CVS is gonna make a comeback! I tell ya!

[-] [email protected] 3 points 4 months ago

I do miss the tags of SVN that would replace certain strings on each commit such as the date, a version number, etc.

[-] [email protected] 2 points 4 months ago

I miss mercurial and it's far more sensical flags and commands...

[-] [email protected] 2 points 4 months ago

Me too. It also handled some situations, like divergent lines in the same branch or obsolete changes, much better.

[-] [email protected] 2 points 4 months ago

It's still here and very much alive in case you were curious.

load more comments (1 replies)
load more comments (1 replies)
[-] [email protected] 2 points 4 months ago

No love for cvs?

[-] [email protected] 1 points 4 months ago

The last one can easily describe Django. Feels like depending on the code base/your mistakes/people you work with can easily turn a normal project into a project where majority of the files is just migration files.

load more comments
view more: next ›
this post was submitted on 18 Feb 2025
385 points (96.4% liked)

Programmer Humor

24709 readers
232 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS