Git/Atlassian Stash - how do combine commits before making a PR?


  • :belt_onion:

    Hence my dislike for merge commits.


  • Discourse touched me in a no-no place

    @blakeyrat said:

    Ugh. Well that's a solution. I guess. That's awful though.

    If you kept the repo on a regulary-backed-up-server you could keep your tools on the laptop. That lets you skip the end-of-day commits.

    Of course, that would (I guess) leave you without the ability to work if you're not at the office or a place you can VPN. I don't remember if you've said anything to indicate that would be a problem for you.



  • @FrostCat said:

    Of course, I'm also used to working on systems that get regularly backed up so I don't feel the need to do otherwise-superfluous end-of-day commits

    Our network drive is backed up of course, and I could maybe do dev from it, but then I wouldn't be able to work offline. Which is the only reason to use git in the first place.

    EDIT: BTW don't think I didn't notice you just deflected your reply away from the fact that you were listening to shoulder aliens and ascribing their sayings to me.



  • @blakeyrat said:

    The reason I need to know when it comes to Git is because Git was written by unintuitive software developers who are ok with shipping an unintuitive product.

    You can do a 238947927304892 step process in a single command line. You can show all command lines in a help command.

    GUI does nothing to make the GIT commands more intuitive, which is the problem you are having.

    I know places that spend lots of time building GIT .bat.

    :WTF:

    I get that a platform is flexible, but if it takes that much time to create your work environment, there's a problem.

    I see both sides to this.

    1. The boss is asking for things because he is using the tool wrong.
    2. Blakey is right about GIT being confusing as fuck if you want to do something more complex then commit/push/stash/pull-request.


  • @sloosecannon said:

    But, since Blakey's workflow (either due to policies or his own personal rules) is to push everything when he commits, he shouldn't be doing history rewrites, since it's all up on the server already

    But on a private branch!


  • :belt_onion:

    @EvanED said:

    But on a private branch!

    boss checks out Blakey's branch to check what he's up to, Blakey rebases, boss's working copy gets screwed.



  • @xaade said:

    GUI does nothing to make the GIT commands more intuitive, which is the problem you are having.

    Of course a bigger problem is that the GUIs are using the CLI at all instead of talking directly to whatever shared library Git ships. Assuming they even ship one. Which they probably don't because Git is ass.

    "Using a CLI as an API" is a hugely destructive anti-pattern that's endemic in the open source world.

    @sloosecannon said:

    boss checks out Blakey's branch to check what he's up to, Blakey rebases, boss's working copy gets screwed.

    Right; and the only reason boss's working copy gets screwed is because of a bug in Git where Git can't communicate rebases to clients.



  • @blakeyrat said:

    But there's no way this isn't a bug

    Not a bug. X-Step idea doesn't exist as one button for your convenience. Again, GIT is over the top complex. It's choice of terms is also bullshit. Purposefully picking new terms for things we've had for a long time is just arrogant.

    @blakeyrat said:

    Ugh. Well that's a solution. I guess. That's awful though.

    Well, the exact phrasing can be more work environment appropriate, but the intent is still the same.

    I'm doing this because I want to ensure my work progress is protected. Do you have a process that accommodates both our needs? I'm ethically bound by my own personal creed to do this.

    Which is really just a polite, fuck off, because a good supervisor would be well on his way to a compromise by now.



  • @blakeyrat said:

    "Using a CLI as an API" is a hugely destructive anti-pattern that's endemic in the open source world.

    The only way that makes sense is if they wrapped all the functionality into a single exe.

    If so..... yeah, :wtf:.



  • @xaade said:

    X-Step idea

    What is that?

    @xaade said:

    The only way that makes sense is if they

    Who's "they"?

    You keep introducing terms that come out of nowhere.



  • A easy solution has already been posted by @cartman82 . I don't understand why you are still ranting --in coding help no less!


  • :belt_onion:

    @blakeyrat said:

    Right; and the only reason boss's working copy gets screwed is because of a bug in Git where Git can't communicate rebases to clients.

    NOTABUG: AS DESIGNED


  • BINNED

    @Mikael_Svahnberg said:

    A easy solution has already been posted by @cartman82 .

    It would also take less time than he's spent complaining here. And then he'd have nothing to complain about. Hmmm, I think I may have found the problem.....



  • "The repo's state can be changed in a way that's impossible to communicate to the client."

    "NOTABUG!"

    "But..."

    "NOTABUG!"



  • Fuck discourse on ipad! I was not done yet.

    I would like to repeat: tags

    Tag your 'done' commits, and leave the others as white noise.



  • @blakeyrat said:

    You keep introducing terms that come out of nowhere.

    That's why I have your quote up there.

    They being those who "use a CLI as an API".

    As for X-Step idea, I'll be more clear. 89239283923-Step process that can be featurized into a single button for blakey to press.

    Note: avoid pronouns


  • Java Dev

    @xaade said:

    The only way that makes sense is if they wrapped all the functionality into a single exe.

    If so..... yeah, :wtf:.

    Isn't it a single binary to begin with? With shit like git-pull just being a symlink to git, which still sees it's been invoked as git-pull and hence acts like git pull.

    The fact this is possible does not necessarily make it a good idea.


  • :belt_onion:

    If you delete C:\Windows\System32, the computer doesn't work anymore. IT'S A BUG! FIX IT!!!!!!!!!!!



  • @Mikael_Svahnberg said:

    I would like to repeat: tags

    Tag your 'done' commits, and leave the others as white noise.

    I don't understand how that helps.

    @PleegWat said:

    Isn't it a single binary to begin with? With shit like git-pull just being a symlink to git, which still sees it's been invoked as git-pull and hence acts like git pull.

    The fact this is possible does not necessarily make it a good idea.

    The question isn't how many binaries there are, the question is whether the back-end library that does the actual work of Git is buildable on its own separate from the UI.

    If so, then there's no reason for all these GUI tools to be calling out to the UI except they're broken shit. Like everything in the Git ecosystem.



  • Not quite the same as

    "Feature I just imagined is missing. Fix it! But I can act like an ass and do all the things I criticize others for doing."

    Similar to "Girl is dressed skimpy in video game. Fix it. But I get to dress how I want. Don't oppress me."



  • @sloosecannon said:

    If you delete C:\Windows\System32, the computer doesn't work anymore. IT'S A BUG! FIX IT!!!!!!!!!!!

    That is a bug, not sure who you're making fun of here.



  • @blakeyrat said:

    That is a bug,

    Define bug?


  • :belt_onion:

    Ah, I see. Very well then.


  • :belt_onion:

    No, they're using git in a way it was never designed for. Shockingly, it doesn't work as expected. Deleting System32 is using Windows in a way it was never designed for. It doesn't work either...


  • Java Dev

    @blakeyrat said:

    The question isn't how many binaries there are, the question is whether the back-end library that does the actual work of Git is buildable on its own separate from the UI.

    If so, then there's no reason for all these GUI tools to be calling out to the UI except they're broken shit. Like everything in the Git ecosystem.

    Yeah, I strongly suspect there is no backend library, but everything's just a single binary blob. I've read once that some windows git distros are impossibly huge because every tool is that entire binary because windows doesn't do symlinks.


  • FoxDev



  • @blakeyrat said:

    I don't understand how that helps.

    Problem: your boss cannot separate your halfway-there commits from the 'done fixing' commits.

    Solution: use tags to make the 'done fixing' commits stand out more, so your boss can easily see them.

    Better solution: As posted by @cartman82


  • Java Dev

    @RaceProUK said:

    Incorrect:

    Huh. TIL.

    Having a symlink to a binary act different than invoking the binary directly is still :wtf:y IMO.



  • @blakeyrat said:

    Right; and the only reason boss's working copy gets screwed is because of a bug in Git where Git can't communicate rebases to clients.
    You're saying that Git should destroy information! Which, despite your protestations to the contrary, it is actually very reluctant to do!


  • Fake News

    @sloosecannon said:

    @EvanED said:
    But on a private branch!

    boss checks out Blakey's branch to check what he's up to, Blakey rebases, boss's working copy gets screwed.

    Oh FFS.
    If the bossman is silly enough to peek in somebody's private branch, tell him he should use git fetch <remote>/<branch> --force to be back in sync with the branch as pushed by Blakey.

    Better yet, if he wants to peek he should use some kind of central Git frontend. Github or Gitlab for example support this without trouble - if it detects a rebase, it will reset the pull request view with the "new" commits.


  • :belt_onion:

    True. Still, it doesn't appear he knows any more than Blakey does on this matter... so...


  • Discourse touched me in a no-no place

    @blakeyrat said:

    EDIT: BTW don't think I didn't notice you just deflected your reply away from the fact that you were listening to shoulder aliens and ascribing their sayings to me.

    You should probably stop taking so many drugs.


  • Discourse touched me in a no-no place

    @xaade said:

    Define bug?

    Please, in his case it involves the phrase "trolling people".


  • Fake News

    @sloosecannon said:

    True. Still, it doesn't appear he knows any more than Blakey does on this matter... so...

    Admitedly, TRWTF is that somebody mandated Git, yet they didn't document how the workflow was supposed to look. Heck, we even used to have a Subversion manual back in the day...


  • FoxDev

    NTFS reparse points <> symlinks, and they can cause certain tools to got bezerk.

    that's because unless you actually specifically query for them a reparse point looks just like a directory. so a tool that does a directory tree walk that doesn't specifically look for reparse points will not see that it has reentered a branch after traversing a reparse point.

    Backup solutions that work at the file level are famous for doing this (although they are getting better) and will happily consume as much tape as you give them backing up a circular FS structure created with reparse points.

    In Linux symlinks are reported as links to the program so any program that doesn't know about them will not follow them and the ones that do know about them and blindly follow them.... well at least they had to work at being wrong.




  • FoxDev

    clever!

    I like that!


  • Discourse touched me in a no-no place

    @accalia said:

    NTFS reparse points <> symlinks, and they can cause certain tools to got bezerk.

    What you say is only true in a sort of reverse-tautological sense.



  • @accalia said:

    In Linux symlinks are reported as links to the program so any program that doesn't know about them will not follow them
    ...er, what? The whole point of symlinks is that if the program doesn't do anything special, it does follow them. That how they behave and have "always" behaved on Linux. If you say FILE * f = fopen("/path/to/some/symlink") and then read from f, you will get the target of the pointed-to file. You don't have to detect that it's opening a symlink and do something special -- quite the contrary, if you want to know that you're opening a symlink, you have to explicitly detect that.



  • Havng slept on the matter, I now realise you are Doing It Wrong. You are trying to use your companys git server as uour personal backup server when you commit half finished work just so you can go home. Stop doing that - configuration management tools are not backup tools! Instead, get a proper backup solution for yourself, and use the configuration management tool to manage configurations.


  • Java Dev

    This. Only by explicitly using the lstat(), readlink() or readlinkat() system calls you can detect a symlink. Normal operation (stat(), open() withoout O_NOFOLLOW, etc) means symbolic links are followed.



  • The best way to avoid having too many commits is not to commit in the first place

    1. Use SourceTree to stash (button on top toolbar). It goes to the left menu Stashes section. The other Git clients would then see a clean working copy for you to switch branch. Apply stash by right clicking on the stash in the Stashes section and your working copy changes comes back

    2. At the end of the day, create a patch (Action>Create patch) from your working copy changes and store it in Dropbox/network drive.
      If you have working copy changes that you need to backup on your other branches (these changes will be on your Stashes if you follow 1), then

    stash working copy changes
    switch branch
    apply stash for that branch
    create patch and store on Dropbox
    repeat until all stashes are backed up.


  • BINNED

    @JBert said:

    Admitedly, TRWTF is that somebody mandated Git, yet they didn't document how the workflow was supposed to look. Heck, we even used to have a Subversion manual back in the day...

    That's actually Standard Operating Procedure™ in the American corporation. Decisions are made by people who don't have to deal with implementation or consequences. Many :wtf: s can be traced directly to this policy.


  • Discourse touched me in a no-no place

    @antiquarian said:

    That's actually Standard Operating Procedure™ in the American corporation. Decisions are made by people who don't have to deal with implementation or consequences. Many :wtf: s can be traced directly to this policy.

    Not just in the American Corporation. It's an endemic feature of large organisations worldwide. You'll find that the majority of government and university :wtf:s can be traced back to the identical phenomenon. (Politicians are just the ultimate in know-nothing parachuted-in senior managers…)



  • git commit --atrocities



  • @blakeyrat said:

    aint_got_no_time_for_that.gif

    Seems to me that the fundamental root of your problem is conflating version control with backup. Yes, with a central VCS you do get off-machine backup as a natural side effect of a commit; with a DVCS you don't.

    If I had your concerns I'd be putting my local work tree, including its local Git repo, in a Dropbox* folder to guard against random laptop exploserage, then just using my DVCS as a DVCS. This would give me better protection against laptop failure than relying on regular commits to a central VCS as well as being a whole lot less trouble.

    *or suitably corp-hosted local-folder-syncing equivalent



  • Or, what he said.



  • @blakeyrat said:

    The question isn't how many binaries there are, the question is whether the back-end library that does the actual work of Git is buildable on its own separate from the UI.

    Last I checked -- there is no libgit.a or libgit.so, although it may have changed since then.

    Edit:

    @PleegWat said:

    Yeah, I strongly suspect there is no backend library, but everything's just a single binary blob. I've read once that some windows git distros are impossibly huge because every tool is that entire binary because windows doesn't do symlinks.

    :hanzo:ed

    @xaade said:

    Similar to "Girl is dressed skimpy in video game. Fix it. But I get to dress how I want. Don't oppress me."

    My complaint would be "Girl has no concern for practicality in her wardrobe. Fix it, unless you're intending the character to be that way, then make the outfit as impractical as it seems" ;)

    Filed under: white, long sleeve, high-collar formal gown to the ankle, white leather gloves, white riding boots with chrome-plated heels, and a white Sam Browning belt with a sidearm holstered at one side and 18" of curved combat knife sheathed at the other



  • @tarunik said:

    unless you're intending the character to be that way, then make the outfit as impractical as it seems"

    I don't get it, the swords and arrows are magically drawn to the small portions of her body that are covered in metal. - NPCs. (paraphrased)



  • @xaade said:

    I don't get it, the swords and arrows are magically drawn to the small portions of her body that are covered in metal. - NPCs. (paraphrased)

    *chortles*

    Line from one of my characters (L4 wood elf cleric in fullplate in one of my 3.5e games) after someone thrust a shortsword at her, only to have it bounce off her armor:

    "You were expecting me to lift or lower something for you, eh? That's not how it works out here"

    (Best part: the char in question has all of 6 base STR.)


Log in to reply