Git help - branches with no commits?



  • The idea is every branch branches from master or a subbranch of master and when work is completed, merge back into master.

    But there are different workflows, IIRC Git-flow makes a development branch from master and whenever you have a release, the current state of the development branch is merged into master and a release branch.

    My team is using a model where we each have our own personal fork, and any time we are ready to merge code, we open a pull request from whatever branch we're developing on in our personal fork to the master branch in the main project repository. Stash keeps the master branch of your personal fork in sync as long as you haven't made any commits against the master branch in your local repo yourself.



  • Well duh, I get that. But you said it "makes sense as a name" which is blatantly untrue.

    If we're going to use the tree branches metaphor (which Git apparently slightly sort-of attempts, because it does use the word "branch", although I'm sure the Git developers are so fucking clueless they don't even understand the concept of a "metaphor"), then the most appropriate name would be "trunk". Right? It's a tree. The branches extend from the trunk. That makes sense.

    How does "master" make sense? That makes me think of some British guy in India surrounded by native Indians serving him lemonade. How does "master spawns branches" make sense at all? This British guy is suddenly spouting other, smaller, British guys? Like from his neck? Huh?

    That could not be further from "makes sense".

    I think the problem is you've worked with Git so long it's infected your skull with the brainworms I talked about earlier that somehow make it so people who use and like Git become incapable of seeing any flaws in it.



  • You'd have to ask Linus why he went with "master" instead of "trunk" but I would assume it would be to get away from svn terminology. I would assume that you think that's stupid and confusing, and it probably is unnecessary and (slightly) confusing.

    Shot in the dark would be that if you did a major refactor on one branch and wanted to consider that branch as your "master" branch from then on, you could rename "master" to something like "old-master" and rename the new branch to "master", whereas using trunk for those terms would imply that you actually have to merge the commits into "trunk" or completely replace the contents of "trunk" if you wanted to do that.



  • @JazzyJosh said:

    You'd have to ask Linus why he went with "master" instead of "trunk" but I would assume it would be to get away from svn terminology.

    I'm more interested in why you think that terminology "makes sense". Because I have trouble thinking of a pair of words that make LESS sense together.

    @JazzyJosh said:

    Shot in the dark would be that if you did a major refactor on one branch and wanted to consider that branch as your "master" branch from then on, you could rename "master" to something like "old-master" and rename the new branch to "master", whereas using trunk for those terms would imply that you actually have to merge the commits into "trunk" or completely replace the contents of "trunk" if you wanted to do that.

    That doesn't make any sense.

    Why is it impossible to rename "trunk" to "old-trunk" and turn your refactor branch into the new "trunk"?

    You can call the operation "take a cutting". Growing a new tree from the branch of an older tree is called that. The metaphor still works more or less.

    Ok, it's a stretch, but at least that way there IS a metaphor, not some British guy in India with branch protruding from his body at all angles.



  • There's this also:

    ##Master
    adjective
    1.
    having or showing very great skill or proficiency.
    "a master painter"
    [b]2.
    main; principal.
    "the master bedroom"
    synonyms: principal, main, chief; biggest[/b]

    Or if you like Merriam-Webster better:

    ##master
    adjective mas·ter
    Simple Definition of master
    : highly skilled
    [b]: largest or most important
    —used to describe an original version from which other copies can be made[/b]



  • Ok? Thanks for showing me the dictionary, I guess?



  • You're welcome.



  • Next time you want to make a completely content-less post, maybe consider... not doing it? Just a thought.



  • I mean, hopefully it explains why naming your main branch "master" makes sense, seeing as it is the main branch, and one from which other copies (i.e. branches) can be made.



  • Then they should be called "copies" or perhaps "mimeographs" or "duplicates" or "xeroxes" or something instead of "branches". So no, it still doesn't make sense, and I'm becoming increasingly convinced you also do not know what a metaphor is.



  • That's the one where you use like or as, right? 🚎


  • Banned

    @blakeyrat said:

    You've never, ever, replied to anything I've written on this forum except to call me an idiot.

    Your memory is very selective. That, or you have very, very loose definition of calling someone an idiot, similar to what you think a lie is.

    @blakeyrat said:

    Frankly, I'd be happier if you just stayed the hell out of ALL of my threads.

    And I would be happier smoking a joint every evening. Neither's gonna happen though - so just deal with it.

    @blakeyrat said:

    The thing you miss is I do know the basics.

    You didn't know the git branch command operated on current branch. So no, you don't.

    @blakeyrat said:

    I use Git successfully every fucking day, despite its best attempts.

    When I was 3, I used a computer every day to play games. I wouldn't say I knew basics of DOS usage back then, despite being able to successfully enter commands.

    @blakeyrat said:

    I say it's shit because it's shit.

    Even worse argument.

    @blakeyrat said:

    In any case, running it on every branch is great but that's only part of the problem. Then you have to get the results of every run and find their intersection, which I dunno, maybe "xargs" can do that, but I'm guessing it's much more likely that you, like all open source developers, only solved 1/3rd of the problem then arbitrarily declared it "done".

    To be precise, I solved part of the problem, declared this part of the problem done, and haven't got the chance to solve the rest yet.

    @blakeyrat said:

    I can't forget something I never even knew in the first place.

    As I said, you don't know Git basics.

    @blakeyrat said:

    I've worked with tons of Git repos that do not have a branch named "master".

    And it's the evidence of... what exactly? Because it sure as hell isn't evidence that Git doesn't name the master branch "master" by default.

    @blakeyrat said:

    And it never occurs to you that if I've been using Git for this long, and haven't "learned" all this stuff you consider is so critical, maybe that's Git's fault?

    Git's fault is it being difficult and having big entry barrier. Your fault is not trying to get across this entry barrier. Both these complaints are equally as valid.

    @blakeyrat said:

    Haha, just in your previous post you grabbed logic by the neck and squeezed to somehow justify that dumb "malformed" error message, which is obviously wrong to any human being with a 3rd grade education. Now you've flip-flopped completely. Awesome.

    Is it so hard to grasp the idea that I might get the rationale behind something and at the same time dislike it?

    @blakeyrat said:

    If there's something I need to know to use Git, it's Git's responsibility to teach it to me.

    It would be Git's responsibility if Git wanted you to use it. It doesn't. Git team have you deep up their asses. Most likely, they don't even recognize your existence. If you want to use Git, it's your fucking responsibility to learn how to. If your employer wants you to use Git, it's their fucking responsibility to teach you how to. That's how it works. It would only be Git's responsibility to teach you if someone paid them to teach you.



  • @Gaska said:

    It would be Git's responsibility if Git wanted you to use it. It doesn't. Git team have you deep up their asses. Most likely, they don't even recognize your existence. If you want to use Git, it's your fucking responsibility to learn how to. If your employer wants you to use Git, it's their fucking responsibility to teach you how to. That's how it works. It would only be Git's responsibility to teach you if someone paid them to teach you.

    I think I speak for every sane human, and even blakey himself when I say that any computer application with this approach to usability is fundamentally broken.



  • @Gaska said:

    You didn't know the git branch command operated on current branch.

    IN THIS VERY THREAD are like a half-dozen examples of where the "git branch" command is used with a provided branch name that is not the current branch. Jesus, man, just scroll up.

    If you're wondering how you have zero credibility with me, maybe think about how you keep typing stuff that's easily shown to be wrong. (I won't use the word "lie", since you apparently don't like it.)

    @Gaska said:

    Git's fault is it being difficult and having big entry barrier. Your fault is not trying to get across this entry barrier. Both these complaints are equally as valid.

    So the problem where a few people make life fucking miserable for TENS OF THOUSANDS OF PEOPLE is equally as valid as the problem where one person kind of has some difficulty using a product.

    No, I'm sorry. What the incompetent Git developers have done is FAR worse than anything I've done OR anything I'm even capable of doing.

    Look, if you believe in karma, just think about it. Think about all the hatred people have of computers due to Git. Think of all the frustration Git has created in the world. Think of all the pain and annoyance. Think of the work lost due to things like Git lacking proper file-locking. Think of all the hobby projects that went nowhere, all the software improvements that never got made, because people couldn't figure out their source control. Stop and think about it.

    They have control of a product that, for better or worse, tens of thousands of people use. Maybe more. That's a lot of power. That's a lot of responsibility. And what have they done with that power? How well have they fulfilled their responsibilities?

    Those people ain't going to heaven.

    @Gaska said:

    If you want to use Git,

    Again you're talking about what I want. No I don't want to use Git.

    @Magus said:

    I think I speak for every sane human, and even blakey himself when I say that any computer application with this approach to usability is fundamentally broken.

    Amen.

    I'm not even asking for the Holy Grail, here. I mean just look at the basic mistakes we've discovered in this thread. Just having reasonable error messages and using a metaphor that makes fucking sense for their terminology would make Git ten times better.

    It's been around for, what, 8 years? And in all that time they haven't improved either of those obviously-broken things.

    What's most frustrating about Git isn't that it's crappy software, but that there's absolutely ZERO evidence that it will EVER be better. Even if it's around for 50 years, it'll be just as awful in year 50 as it is today. There's no improvement, and there's not even any acknowledgement by the people in charge that improvement is necessary. It's hopeless.



  • Just delete them all without "--force". It'll refuse to delete any that have unmerged commits.

    git branch -ar > branchlist.txt
    sed -i 's/^.*origin\//:/' branchlist.txt # Remove the "origin/" from all branch names, prefix with :
    git push origin `cat branchlist.txt`


  • @Circuitsoft said:

    Just delete them all without "--force". It'll refuse to delete any that have unmerged commits.

    Haha yeah. That requires a level of trust between me and Git that, frankly, ain't ever going to exist.



  • Well, sorry. If you want, you can review each branchname in branchlist.txt before running the last command. But, really, I have never seen it fail in this way, having used it for 6 years. Whenever I have tried to do something that is actually destructive to committed data, it has always required a "--force".

    Now, to be fair, I don't know for sure if Stash also adheres to that rule, but I think it does. When I was using it, we were careful enough about deleting old branches that it never became an issue.



  • I agree with you 100% here.


  • Banned

    @Magus said:

    I think I speak for every sane human, and even blakey himself when I say that any computer application with this approach to usability is fundamentally broken.

    Note that I was saying about teaching. Not clean docs, not good learning materials, not good UI and well-written error messages, but the act of teaching specifically. Teaching, as in holding a hand and giving a tour for every thing. Because this is clearly what @blakeyrat needs, and it's what he complains about Git not doing to him.

    @blakeyrat said:

    IN THIS VERY THREAD are like a half-dozen examples of where the "git branch" command is used with a provided branch name that is not the current branch.

    And another half-dozen where it's done without. And even within the ones with branch name, you didn't realize there's a branch name in them.

    @blakeyrat said:

    If you're wondering how you have zero credibility with me, maybe think about how you keep typing stuff that's easily shown to be wrong.

    I wonder why you think I give a shit about my credibility with you.

    @blakeyrat said:

    So the problem where a few people make life fucking miserable for TENS OF THOUSANDS OF PEOPLE is equally as valid as the problem where one person kind of has some difficulty using a product.

    Yes, if by valid you mean valid, not important. Valid, as in not invalid. I used valid as valid, since valid means valid, not important. Neither of these is invalid, right? Then they're both valid.

    @blakeyrat said:

    Look, if you believe in karma, just think about it.

    Sadly, I don't, so I'll just skip over the whole bold part since it's not relevant to me.

    @blakeyrat said:

    Again you're talking about what I want. No I don't want to use Git.

    Again you're replying before you finished reading what I wrote. It was if-then. A logical implication. If the condition isn't fulfilled, the whole statement is still true. And the very next statement has if-then construct where the condition is actually fulfilled.

    @blakeyrat said:

    It's been around for, what, 8 years? And in all that time they haven't improved either of those obviously-broken things.

    Yes, they haven't improved for years. Yes, it sucks, so fuck Git for that. But you haven't improved your proficiency with Git either in the last year(s?). No, Git isn't to blame for that last one. And no, it is entirely possible to become proficient in software that sucks monkey balls down the lungs, especially if you're exposed to it for such a long time by now. I know what I'm saying because at my job, I have to deal with TTCN-3 - a single-purpose programming language for tests that absolutely sucks for writing tests (and writing anything else is literally impossible), with in-house compiler and in-house execution environment for it - both ridden with bugs more than Bethesda games on release day. I can deal with this shit - why can't you deal with Git?

    @blakeyrat said:

    Haha yeah. That requires a level of trust between me and Git that, frankly, ain't ever going to exist.

    +1



  • @Gaska said:

    I can deal with this shit - why can't you deal with Git?

    I can and do deal with Git.

    Please insert that idea into your shrunken, inefficient, mind once and for all, because I'm sick of repeating it to you.


  • ♿ (Parody)

    @blakeyrat said:

    You've never, ever, replied to anything I've written on this forum except to call me an idiot

    Honestly, I thought his first post in this topic was him going to a lot of effort to help you in a serious fashion.


  • ♿ (Parody)

    @blakeyrat said:

    So no, it still doesn't make sense, and I'm becoming increasingly convinced you also do not know what a metaphor is.

    You have the strangest mind.



  • Yeah well I certainly wouldn't be part of the group-think.


  • Banned

    @blakeyrat said:

    I can and do deal with Git.

    You lack basic knowledge about how Git works and refuse to learn it, which results in you repeatedly going to this forum asking questions about basic stuff, and when answer is given, you don't (fully) understand it, and when further problems arise due to you misusing of solutions, it looks like you don't even try to solve them on your own. That's not exactly what I'd call "can".



  • Well why don't you just mentally file me away as "super dummy moron retardo" and stop interacting with me, then.


  • ♿ (Parody)

    @blakeyrat said:

    Yeah well I certainly wouldn't be part of the group-think.

    You could at least join the human- think?



  • Pfft. Racist.


  • Banned

    @blakeyrat said:

    Well why don't you just mentally file me away as "super dummy moron retardo"

    Already did.

    @blakeyrat said:

    and stop interacting with me, then.

    Not a chance. You're too funny.



  • I think you and blakey have different definitions of "basic understanding". It's interesting to examine that. Why should I have to lean what git considers a valid object reference, committish or whatever? Why do I care about an error message that only makes sense in the context of git's vocab - why can't it be better?

    A good tool is one that requires no (minimal) learning.


  • Banned

    @charlieda said:

    Why should I have to lean what git considers a valid object reference, committish or whatever?

    If you want to know what the commands you're entering mean, it's necessary. If you don't want to know what you're doing, then yes, I guess you can go ahead without ever learning it. Just like all those PHP programmers from frontpage articles do.

    @charlieda said:

    Why do I care about an error message that only makes sense in the context of git's vocab

    Do you want to know what's the error and how to fix it or not? Git has awful error messages, but it is absolutely possible to decode them.

    @charlieda said:

    why can't it be better?

    Of course it can! It's just no one cared enough to fix it yet. Might be because everyone except @blakeyrat somehow manage to endure the crappy text since getting their shit done is more important to them than whining.



  • The thing that gets me is that Gaska seems to have the tiniest recognizition somewhere back in his lizard-brain that Git is an awful tool, but instead of ever just saying so, he'll defend it to the death. He'll gut and murder the entire concept of "vocabulary" in a ludicrous attempt to explain how the error message "malformed object name" makes sense.

    Is this what Stockholm Syndrome looks like? I mean, what is this?

    He'll say things like this:

    @Gaska said:

    Might be because everyone except @blakeyrat somehow manage to endure the crappy text since getting their shit done is more important to them than whining.

    Without realizing that getting in my way while I'm trying to get shit done is exactly my complaint about Git!

    My "shit" is writing healthcare software. If I have to spend even 50 nanoseconds learning how this obscure broken product works, that's 50 nanoseconds that I'm not getting my shit done.

    So it's like he somehow understands that concept, that Git is the problem preventing me from getting shit done, but in the same sentence declares it's not a problem. Boomzilla has the opinion that the way I think about stuff is weird (apparently because I don't think a metaphor where branches extend from masters makes sense), but this thinking from Gaska is completely alien to me.



  • @Gaska said:

    If you want to know what the commands you're entering mean, it's necessary. If you don't want to know what you're doing, then yes, I guess you can go ahead without ever learning it.

    It's a leaky abstraction. You shouldn't have to know that to use it, but you currently do.


  • Banned

    @blakeyrat said:

    The thing that gets me is that Gaska seems to have the tiniest recognizition somewhere back in his lizard-brain that Git is an awful tool, but instead of ever just saying so, he'll defend it to the death.

    You completely misunderstand. Git's UI is godawful, I admit. A giant pile of WTFs all over the place. But despite this, it's still usable. You just have to spend quite a lot of effort to learn how to do everything. The fact you do everything in your power to avoid it makes you TRWTF.

    @blakeyrat said:

    Is this what Stockholm Syndrome looks like?

    Brotip: if you're not sure what something means (in this case: Stockholm Syndrome), google it up. Lets you avoid making idiot out of yourself.

    @blakeyrat said:

    I mean, what is this?

    Something between being completely fed up with your whining and playing devil's advocate to the max.

    @blakeyrat said:

    Without realizing that getting in my way while I'm trying to get shit done is exactly my complaint about Git!

    It wouldn't get in your way if you knew how to use it. The fact it's very hard to use well is another issue.

    @blakeyrat said:

    My "shit" is writing healthcare software. If I have to spend even 50 nanoseconds learning how this obscure broken product works, that's 50 nanoseconds that I'm not getting my shit done.

    — source: TDWTF forum; posted during work hours

    Fun fact: in most companies, it's fairly easy for a full-time employee to justify wasting your work time on learning your tools. Some companies even encourage doing it!

    @blakeyrat said:

    this thinking from Gaska is completely alien to me

    That a professional should know their tools?

    @JazzyJosh said:

    It's a leaky abstraction. You shouldn't have to know that to use it, but you currently do.

    Well, if a command's interface accepts Git object (any Git object) as argument and it's in the manual that it does so, then it's not leaky abstraction at all.


  • I survived the hour long Uno hand

    @Gaska said:

    it's still usable. You just have to spend quite a lot of effort to learn how

    That's not what usability means.


  • Banned

    Well, I'm not a native speaker, so I mess up words sometimes. What's the correct word for "something that can be used"?


  • I survived the hour long Uno hand

    "able to be used" is "usable", but Usability as a software quality attribute describes how easy it is to learn and use a particular piece of software. It involves looking at things like how much you have to keep in working memory or memorize vs how much the software will help you use it, and how quickly people learn how to use something from no prior knowledge.

    The word you wanted in this context is "functional", which is the quality attribute describing whether or not the software works the way it was intended to work.



  • @Yamikuronue said:

    The word you wanted in this context is "functional", which is the quality attribute describing whether or not the software works the way it was intended to work.

    It's important to remember that 90% of the stories on this site are to do with people whose only goal is this, rather than usability.



  • Also, everybody who works with software, should read "The Inmates Are Running the Asylum" and learn the term dancing bear-ware.

    Because Git is SO dancing bear-ware.

    The idea is that you go to the circus and you see a dancing bear. It doesn't dance well, it's not going to be teaching a dancing class, it has no rhythm, it keeps tripping over its own feet. But the amazing thing to you is that the bear is dancing at all. That's Git. It's terrible at being a distributed source control product, fucking awful at it. The only thing notable about it is that it works at all. It's totally a dancing bear.


  • I survived the hour long Uno hand

    I dunno about 90%. Maintainability is another often-ignored quality attribute >.>

    But we definitely see failures of all the attributs: Reliability, Usability, Efficiency, Maintainability, Portability (that's probably the rarest to show up here), Security, and Functionality. Functionality is the one people tend to laser-focus on, so it shows up here rarely, because if something flat-out doesn't work it tends to be fixed.


  • Banned

    @Yamikuronue said:

    The word you wanted in this context is "functional", which is the quality attribute describing whether or not the software works the way it was intended to work.

    OK then. Git is barely usable, but it's still functional. You can get it to work like you want it to. It's hard, but not that hard.

    @blakeyrat said:

    The idea is that you go to the circus and you see a dancing bear. It doesn't dance well, it's not going to be teaching a dancing class, it has no rhythm, it keeps tripping over its own feet. But the amazing thing to you is that the bear is dancing at all. That's Git. It's terrible at being a distributed source control product, fucking awful at it. The only thing notable about it is that it works at all. It's totally a dancing bear

    Wrong analogy. Git is a rather good DVCS. It's just that its UI is one big joke. At its core, it's pretty good and well-designed. It's better compared to a world-class dancer who is very hard to convince to give a performance.


  • I survived the hour long Uno hand

    @Gaska said:

    It's better compared to a world-class dancer who is very hard to convince to give a performance.

    Or a world-class dancer dancing in a locked room, alone, with a tiny, ancient black-and-white TV set on the stage for the audience to try and make out the dancing. The interface is crucial to use of the product.


  • Banned

    @Yamikuronue said:

    Or a world-class dancer dancing in a locked room, alone, with a tiny, ancient black-and-white TV set on the stage for the audience to try and make out the dancing.

    No, this would be if you were to edit Git's internal files by hand. Git's UI is hard, but not that hard.



  • And these performances can only be scheduled every second tuesday, six months in advance. Because that's how the dancer decided it should be almost a decade ago.



  • @Gaska said:

    It's hard, but not that hard.

    Compared to what? Building a functional nuclear power plant out of mud bricks?



  • @Gaska said:

    Git is a rather good DVCS. It's just that its UI is one big joke.

    The UI is the product.

    The UI is the product.

    The UI is the product.

    If the UI is bad, the product is bad.

    If the UI is bad, the product is bad.

    If the UI is bad, the product is bad.


  • Discourse touched me in a no-no place

    @Yamikuronue said:

    That's not what usability means.

    It's usable in that technically you can use it, but it doesn't have usability/ease of use. Yay language!


  • Banned

    @blakeyrat said:

    Compared to what?

    Compared to what I described. Damn, can't you just read whole posts?

    @blakeyrat said:

    The UI is the product.

    But not the whole product.

    @blakeyrat said:

    The UI is the product.

    But not the whole product.

    @blakeyrat said:

    The UI is the product.

    But not the whole product.

    @blakeyrat said:

    If the UI is bad, the product is bad.

    There are several aspects that contribute to the quality of product. UI is one of them. Some claim it's most important, others (including me) think it's important, but not as important as core architecture. Some claim Git's UI is so bad it makes the whole product utter shit, others (including me) think that its overexaggeration. Neither is more right than the other, similar to how no one's opinion on a movie is more right than someone else's.

    @blakeyrat said:

    If the UI is bad, the product is bad.

    There are several aspects that contribute to the quality of product. UI is one of them. Some claim it's most important, others (including me) think it's important, but not as important as core architecture. Some claim Git's UI is so bad it makes the whole product utter shit, others (including me) think that its overexaggeration. Neither is more right than the other, similar to how no one's opinion on a movie is more right than someone else's.

    @blakeyrat said:

    If the UI is bad, the product is bad.

    Why are you chanting it three times? Are you trying to summon someone or what?



  • Hoping it'll sink in.

    I was wrong.


  • FoxDev

    @Gaska said:

    Why are you chanting it three times?

    [quote=NotBlakeyrat]
    What I say three times is truth (by definition)
    [/quote]

    <div

  • FoxDev

    If I have a device that feeds me chocolate and beer while giving me a massage, but the interface requires me to break all my fingers, then it is a bad product.

    You can have the most amazing product in the world, but if the interface sucks, no-one will ever label it anything but bad.


Log in to reply