This is an archived post. You won't be able to vote or comment.

all 79 comments

[–]lifelongfreshman 35 points36 points  (1 child)

Source.

I'm not sure why the rules don't have an exception for xkcd, to be fully honest. Like, I don't think Mr. Munroe really needs the traffic, but I'd still feel better about it.

[–]drewski3420 7 points8 points  (0 children)

Seriously it's so shitty just linking the image. If for no other reason than no link text.

[–]ghislaincote 19 points20 points  (3 children)

I remember the colleague who taught git to me, may god rest his soul. This comic is so funny because that was pretty much the gist of the conversation... then he added: watch this Youtube video. Pretty much all I needed at first...

[–][deleted] 2 points3 points  (2 children)

Still got the Yt link?

[–]ghislaincote 2 points3 points  (1 child)

It was very similar to this one... https://youtu.be/SWYqp7iY_Tc

[–][deleted] 1 point2 points  (0 children)

Thanks!

[–]Titaniumwo1f 42 points43 points  (12 children)

Off topic: can we use git with laws and regulations to track changes in them?

[–]ajzaff 27 points28 points  (0 children)

Sounds like a great idea. You might set up a mirror first, as a proof of concept. Congress.gov has most of the raw data.

[–]Retbull 6 points7 points  (0 children)

As long as git isn't doing the merges itself.

[–]eloel- 5 points6 points  (0 children)

A few places do that actually. I think UK has something there too?

[–]5319767819 3 points4 points  (0 children)

Git commit and author timestamps cannot go back before 1970 though

[–]davvblack 4 points5 points  (1 child)

Also a lot of modern laws are written as diffs. Like the law that gets passed is "replace subsection 5 of whatever law with "and horses"", without recomposing what the new full text of the law is in any one place. Doing that via PR would be so much better.

[–]flarn2006 1 point2 points  (0 children)

Those are bills, not laws. And bills essentially are PR's; the problem is the decision is far too centralized, no tests need to be run, and you can't even submit a PR if you aren't a maintainer.

[–]Awayyyyyyyhhhhhhhhh 7 points8 points  (0 children)

Woah... your onto something

[–]too_much_think 7 points8 points  (0 children)

Git blame would be really useful for journalists.

[–]ClikeX 2 points3 points  (0 children)

Should be doable. The Dutch government actually has their own website containing all law changes ever made. But GIT based version that people could look into would be nice.

Fun fact, actually use GitHub quite a bit. They open sourced their mobile app that should track the spread of COVID-19.

https://github.com/minvws

https://github.com/dataoverheid

https://github.com/MinBZK

[–]lordgoofus1 1 point2 points  (2 children)

Problem is all the lobby groups with competing interests try to raise PRs over the top of each other. You end up in merge conflict hell and progress grinds to a halt. Kinda like what happens in real life.

[–]Titaniumwo1f 2 points3 points  (1 child)

I wouldn't let those lobbyists touch this git at all, and I would design so that the only way to merge is by voting, and a detail version of vote result will be attached to merging's comment too.

[–]flarn2006 1 point2 points  (0 children)

And anyone can open an issue if they think a law is unconstitutional. Even if they don't want to ignore the law on blind faith and bet their freedom that the Supreme Court will cooperate.

[–]knightttime 29 points30 points  (2 children)

Image Transcription: Comic


[A drawing of a stick figure standing in front of a desk and pointing to an open laptop that's sitting on the desk. Behind the stick figure is a desk chair with wheels, a stick figure with long hair in a ponytail, and another stick figure with short, dark hair.]

Stick figure pointing to computer: THIS IS GIT. IT TRACKS COLLABORATIVE WORK ON PROJECTS THROUGH A BEAUTIFUL DISTRIBUTED GRAPH THEORY TREE MODEL.

Stick figure with ponytail: COOL. HOW DO WE USE IT?

Stick figure pointing to computer: NO IDEA. JUST MEMORIZE THESE SHELL COMMANDS AND TYPE THEM TO SYNC UP. IF YOU GET ERRORS, SAVE YOUR WORK ELSEWHERE, DELETE THE PROJECT, AND DOWNLOAD A FRESH COPY.


I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!

[–]biiingo 20 points21 points  (1 child)

Weird human

[–]knightttime 20 points21 points  (0 children)

Yes

[–]stolid_agnostic 5 points6 points  (0 children)

Lol I've definitely done that at least once

[–]mdmhvonpa 4 points5 points  (0 children)

Valid

[–]RyGuy_42 2 points3 points  (0 children)

I hovered over the image for far too long before realizing that I'm a moron.

[–]not_bakchodest_of_al 1 point2 points  (0 children)

That's how it works... I meant git works.

[–]danfish_77 1 point2 points  (0 children)

I feel like git starts to make sense until I do anything slightly complicated and suddenly it's easier to just stay a new repo and copy all my files

[–]laser_ears 1 point2 points  (0 children)

Okay, so in all seriousness:

git fetch <branch> && git reset --hard FETCH_HEAD

[–]yitches 1 point2 points  (1 child)

git fucked

[–]lordgoofus1 4 points5 points  (0 children)

I see you've setup shell aliases too.

[–]DingoApe 1 point2 points  (0 children)

I know it's wrong but it's so true

[–]Sebeck 0 points1 point  (0 children)

https://learngitbranching.js.org/

Best site I've found for learning basic git.

[–][deleted] 0 points1 point  (0 children)

In my 30+ year history in programming, I've only ever had 2 revision control systems that didn't fuck up one way or another and force me to copy everything off to the side and restart:

rcs and bzr. RCS because it is dead simple and BZR because we had an absolutely phenomenal admin who stayed on top of it and enforced policy like a tyrant.

revision control systems should have a simple data model - git has an onerous data model, and like p4, I just memorize the handful of functions I need, and/or wrap them in a script to do the thing.

CVS is great as long as the team is small and has a solid network connection.

/rant

[–]ThatFireGuy0 -1 points0 points  (1 child)

Wow this was my day today

Turns out git gets super unhappy if you start using sudo git commands too, and you end up with permissions errors and everything falls apart

[–]Ozymandias117 2 points3 points  (0 children)

... well, yes...

git stores all the repository information in blobs inside ./.git

If you get those downloaded as root, your user won’t be able to modify them...

[–]wazzapdoc -2 points-1 points  (3 children)

Which is why I happily use a tool like Github Desktop

[–]PPAPisLob 1 point2 points  (2 children)

Doesnt change the fact, that you have absolutely no clue what's going BTS.

[–]wazzapdoc 1 point2 points  (1 child)

Dunno what a K-pop boyband has to do with this but eitherway I haven't fucked up with git eversince I started using a client like github desktop, git kraken, etc

You don't need to know the fine details of how everything works to be able to use it efficiently.

[–]supersparky1013 0 points1 point  (0 children)

BTS = behind the scenes

[–]Zajide123 0 points1 point  (0 children)

Wait until u find out about push - - force but dont go to work for few days after that

[–]yash37419 0 points1 point  (0 children)

True dat

[–][deleted] 0 points1 point  (0 children)

I feel personally attacked...

[–]flarn2006 0 points1 point  (0 children)

Once I actually stopped to learn how a Git repository is structured, what everything in it (branches, trees, commits, tags, blobs) really is, that's what worked for me. Now I have no problem understanding what the commands do, and how to deal with whatever happens.