“Fix”
With 400 lines changed over 50 files
“updates”
“feat: stuff”
Guilty of this one myself.
I had a commit recently that was like 2000 lines changed over 6 files. Really should have been a smaller issue.
Y tho??? Holy shit. Commits should be like functions. One thing and one thing only. Maybe a small group of files like the same change over multiple config files. 50 is insane to me.
‘Change’ if I’m feeling particularly chaotic.
See jira-blah: is my go-to. Sometimes there’s even a jira at that location/number 🤔
‘fixed odd or even function for values 600 to 950, plus other stuff I forgot to commit earlier’
Just use What The Commit.
You can also create a git alias:
git config --global alias.yolo ‘!git add -A && git commit -m “$(curl --silent --fail https://whatthecommit.com/index.txt)”’
Now you can just type ‘git yolo’ to create a commit!
“Make Sure You Are Square With Your God Before Trying To Merge This”
Full send.
Thanks for that, I’ve been laughing like a little kid:
“hoo boy”
“lol”
“Become a programmer, they said. It’ll be fun, they said.”
I can feel those so well! :')
Well such an informative reply! Thanks mate 👍
“Chuck Norris Emailed Me This Patch… I’m Not Going To Question It”
Well that’s about half my commit messages that are going to be nonsense on weekends projects, now. Thank you!
Psst,
git add -p
Better yet,
git commit -p
uuuuuuuu. and you could do -m to describe the commit.
next they’ll add --push/-P.
perhaps add -r for fetch/rebase then commit.
one command to rule them all! 😈
git commit -m “changed somethings “
git push origin master
You forgot this
--force
flag.Do you always have to do origin master? I’ve seen it where sometimes just git push works and other times not.
I was being more evil than that, saying that if one is gonna push direct to
main
, might as well maximize the possible damage to everyone else’s branch.Lol why not just delete the whole project from GitHub… I mean, everyone has a copy, right?😱
where it Just Works, the branch is set up to track a remote branch
https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches
uh in any actual company you almost never push to origin master. so I think it’s a joke.
Not with that attitude! /s
Force push Fridays!
In most actually companies you can try push to origin master, but it’ll likely get rejected by the repo’s security policies.
I tired that, still was having issues, weeeird.
I think it depends what branch your local version of the repo is set to. If you’re already in master then it’ll push there, if you’re in a testing branch then you can push it straight to master instead by telling it to
I just meant it not auto creating a new matching named branch.
deleted by creator
That’s in any bloody workplace! Especially if there is o synergy between different teams.
The usual reason would be “because coworkers”
“stuff”
“Commit”
For me, it was my boss gave me a programming task which he knew would take hours or a day or two… and then 15 minutes later tells me to “switch focus” and do a menial task that any of my five coworkers could do 🤦♂️
Oh god I feel so called out. I wish I paid more attention to my commit messages but I’m usually too busy fixing the directory structure and refactoring. Sigh.
My company collapses into a single commit at merge so idgaf what the commit message is anymore. Though I would prefer not collapsing them.
Master should just have the feature description commits, not the hundred commits it took to get there after refactoring the code for the 3rd time and pulling changes from master since it’s taken so long to get done.
I prefer that approach. We work with smaller tasks, so it makea more sense, plus it helps keep the master clean and if you want a more detailed view of the specific commits, you just have to click on the link to the PR. It’s a better way to organise it IMO
Yeah I worked at a place like that, but it made sense because we were also expected to keep PRs small, so a good commit message for several squashed ones was perfectly fine.
[conventional commits] (https://www.conventionalcommits.org/en/v1.0.0/) will save you.
or maybe commitizen if you’d like not to write them by hand.
and maybe commit and tag version, which will create changelogs for you of you follow semverdeleted by creator
git commit -m “break codec sync if UA = firefox/gecko”
“blah”
deleted by creator