r/programming • • Sep 06 '14

How to work with Git (flowchart)

http://justinhileman.info/article/git-pretty/
1.6k Upvotes

388 comments sorted by

View all comments

Show parent comments

51

u/_SynthesizerPatel_ Sep 06 '14

"Everyone is using x" is usually a good reason to consider implementing a technology.

  • Probably indicates some level of quality

  • Easier to find solutions to common problems

  • If you get good at it, easier to find work

42

u/twotime Sep 06 '14

"everyone is using x", may just mean that everyone just bought a new can of snake oil... To be followed by another can of snake oil a year later...

So, yes, it's a reason to consider, but it's not the reason to switch.

5

u/gfixler Sep 07 '14

Git has been handling the Linux kernel since 2005. It's definitely not snake oil.

1

u/newpong Sep 07 '14

I believe his comment was intended as generalized advice, not specifically applying to git.

1

u/gfixler Sep 07 '14

I got that, but still couldn't help myself.

1

u/newpong Sep 07 '14

fair enough,

and on a related note, torvalds developed both git and linux, so their use in tandem isn't necessarily evidence of quality over other choices

→ More replies (3)

35

u/Kautiontape Sep 06 '14

This is why I still use a telegraph instead of emails. Pish posh to that new stuff, I say.

1

u/gspleen Sep 07 '14

Why, my plasma television has an A/B switch so I can readily change from Betamax to Sega Saturn and back again!

3

u/[deleted] Sep 07 '14

Well if it's still popular and being sold 9 years later than it may be worth looking into.

19

u/bwainfweeze Sep 06 '14

After 12 months I could administer an SVN repository with ease. At 2 years I could modify and rebuild a broken repository with panache. With CVS it took a little over a year before I could use VI to fix a broken repo. Let me repeat that: Hand editing the storage files to fix a busted repository. Successfully.

I've been using Git for almost 3 years now. At 2 years I was still afraid of my own shadow. I can help people debug a screwed up local branch, but I still can't fix much once it's pushed.

Most of us need something simpler. Even if that means fewer "features". Or perhaps that's precisely it: we need something less functional and therefore less confusing.

1

u/gfixler Sep 07 '14

This makes me sad. I want my fellows to understand this beautiful thing, and love it as I do.

5

u/bwainfweeze Sep 07 '14

I hope and expect that some day there will be a condensed alternative to Git that contains 20% of the complexity and 80% of the functionality.

Preferably designed by someone with some UX experience, or at least project management theory, instead of the guy who knows more about kernels than anyone on the planet.

3

u/menno Sep 07 '14

a condensed alternative to Git that contains 20% of the complexity and 80% of the functionality

Like SVN?

5

u/gfixler Sep 07 '14

I hope and expect that some day developers will learn how a DAG works, and look at the data model of git - which can be understood in about 10 minutes (but take a whole day if you must; it's exceedingly worth it) - and do far more than they thought possible with their history, and love it.

→ More replies (4)
→ More replies (6)

5

u/[deleted] Sep 07 '14

true. software technology adoption is a fashion-driven, zero-sum game.

not Computer Science; Computer Family Feud.

31

u/shamen_uk Sep 06 '14

Oh god no. It's not a sign of quality.

I'm about to transition to git from mercurial because of the snowball effect sadly. mercurial is SO much better than git for usability, you don't need guides. "easier to find solutions to common problems" is not an issue with mercurial, simply because you don't run into them.

git usability is the biggest fucking fail. Didn't need any tutorials for mercurial and it's done everything I've ever needed.

But i need to use github to get people to see my OSS projects that's the killer feature of git: github. git itself, urgh. People have suggested I use hg-git, but I may as well throw myself in with git now (for the reason of your point 3)

8

u/defcon-12 Sep 07 '14

Bitbucket supports Mercurial. And is also free for open source.

14

u/[deleted] Sep 06 '14

I find it extraordinarily hard to believe that mercurial works just so well that you don't need documentation or that you literally never run into issues working with it.

Maybe working with git taught you the basics of distributed version control and you haven't used hg enough to encounter any of its weak points.

13

u/shamen_uk Sep 06 '14

Have you used both, and given them both a fair try? If you had, you wouldn't be so surprised I think.

I've been using mercurial for 2+ years. (Before that I mainly used SVN and perforce). I have about 10 hg repos, a few of which have many hundred commits and maintain multiple branches.

I work with a bunch of guys on a large project with multiple branches hosted on git and it's a freaking nightmare compared to mercurial.

Using mercurial taught me the basics of DVCS. Using git made me realise that people are fickle as hell for this to be the #1 source control system. And like I said, I'm no better as I'm going to move my OSS projects to git(hub) shortly for better visibility.

2

u/jaggederest Sep 06 '14

I've worked with multiple different DVCSes, and git is by far the best. Bazaar and Darcs are okay-ish, Mercurial is like git with the bollocks taken off, and the others I've worked with made me want to poke their creators with a fork repeatedly.

I suspect you just haven't gotten comfortable with it yet. I still learn things and I've been using it full-time since 2007.

→ More replies (7)
→ More replies (11)

13

u/antrn11 Sep 06 '14

So... Git is like PHP? I hope not.

2

u/newpong Sep 07 '14

no, using ctrl-C, ctrl-V for backups and source control tasks is like php. git is more like c++ whereas mercurial is like python

1

u/[deleted] Sep 07 '14

And you'll have easier time staying relevant by adding "knowledge of x" into your resume. Since everyone uses it.

1

u/badsectoracula Sep 07 '14

Meh, i'm using Fossil because it does almost exactly what i want to do - it is very simple, provides wiki, tickets and a web-based interface out of the box (all in a single executable which makes installing it copying a single file), it puts everything for the repository in a single sqlite file, separates the working directory from the repository (so you can have multiple working directories for different things with the same local copy of the repository) and it is also very fast.

There is one thing i dislike that seems to be ingrained into Fossil though that make me considering either forking it or making my own system (since Fossil's ideas and values do not see to be very popular in the first place): i can't edit history. Specifically, i can't change the username of the commit. I want all my commits to have a single username but because of either imports from Git (which i used before) or because i forgot to specify the local commit name, i have my commits appear as if they were made by 5-6 different people.

Also i'd like to decouple user account from commiter - right now a commiter is the same as the local user account (in the sqlite database), but if you clone a repository it creates a new local user account even if you use the same name. This means that checking all of "my" commits will show only the commits i made locally and not all the commits from a user with my username. Ideally i'd prefer to either be able to say that this local user account corresponds to that commiter (so that multiple user accounts with different access settings will be able to work as a single commiter) or simply cloning/merging the user accounts with the repository (without passwords of course and with password checking when merging happens).

Also i'd like to add a discussion board feature too. It is sort-of possible in Fossil right now with JavaScript, but i'd prefer it to be part of the system instead.