84

Wife: commit, and come to bed..
Me:
> git commit -m "wife wants me to go to bed"
> git push origin master -f

Comments
  • 13
    Why, why would you force it?
    Why do people do this?? 🤬
  • 1
    Remember to commit again next morning.. :D
  • 6
    @C0D4 because it feels better. If you know what I mean 😏
  • 5
    @Coffe2Code you got to work these things, gentle yet firm and precise.

    Your git repo should be the same 😉
  • 6
    Let's just pray that repo is a private repo and not a public/work related repo
  • 0
    Correct of spreading message worldwide
  • 3
    @C0D4 Every time I see this, I think Git shouldn't force unless you also specify --yesidoreallywantthis and --iknowipromiseiwontdothisallthetime.

    It's a bloody dangerous operation, but people seem to throw the flag around like it's a normal part of repo management.
  • 2
    @AlmondSauce I think I've only used force once, but that was due to a merge request being 6months worth of work by another dev and the conflict list was beyond repair.

    Other then that, Getting into a good habit of pull/push regularly keeps the forcing away.
  • 2
    @C0D4 Oh sure, I've used it in similar situations. But I've always been rather scared, and double checked everything before doing so.

    It certainly shouldn't just be "one of these things you do if you get some kind of error", which seems to be how many people rock.
  • 3
    I like how she used the word, “commit”. She understands your work!
  • 2
    -f ?
  • 1
    Where is my 2 days of work ? Under --force
  • 1
    It's quite common for me to do this in feature branches, I like to keep a clean history and possibly with all the commits building/passing tests, so I keep rebasing on top of development, doing fixups and squashing. btw --force-with-lease is better than just force if you don't do a fetch before pushing
  • 1
    And, you should always have protected branches (master/development)
  • 1
    @Coffe2Code sounds more like a force-with-leash
  • 1
Add Comment