There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

BigDanishGuy , in Fitbit Clock Face

I’ve seen too many android devices with corrupt memory showing something like that to want it as a my watchface…

Daxtron2 , in Fitbit Clock Face

Everything’s a string 😢

lseif ,

Everythings an object 😰

Daxtron2 ,

lua tables all the way down

Classy , in Guys! Should I accept the offer? 😂

I remember old YouTube having these kinds of exchanges. I would get DMs asking for a five star rating on a video they uploaded about some relevant topic in exchange for a likewise five star rating. I miss those days

jjjalljs , in git commit -m "minor fixes" +26858 -69429

My commits when merged into main generally read like

[Ticket-123] Summary of what was done. Eg: Return user foo property in bar endpoint

  • update bar view to return new foo key
  • update foobrinator to determine foo property
  • update tests

It takes an extra minute or two but it’s more informative for the team / future me.

onlinepersona ,

Mine look similar except the body is mostly “the X was doing Y, but it should’ve been doing Z” or “the docs say bla, $link”. I try to separate the individual “update A to do B” in separate commits, but sometimes it just isn’t possible.

CC BY-NC-SA 4.0

jjjalljs ,

We squash everything (and rebase rather than merge) so I don’t worry much about the individual commits. I like that main is pretty concise and doesn’t have a ton of work-in-progess stuff in the log.

onlinepersona ,

We are mortal enemies you and I 😄 I’d much rather have a descriptive commit history than huge commits which make git blame meaningless. Function over beauty for me.

CC BY-NC-SA 4.0

jjjalljs ,

A nemesis! I’m pretty lucky I guess that no one at my workplace has strong git opinions that differ

Do you have multiple people’s commits being squashed together? Or how is blame being made useless for you? I’m at a rather small company where generally it’s just one person working on a thing at a time. The blame will point to their squashed commit that, if they wrote a good message like the top of this thread, will give you a lot of context.

onlinepersona ,

Imagine finding a bug in angularjs, doing a git blame and finding this commit

feat(module): new module loader

211 changed files with 1,051 additions and 1,242 deletions.

AngularJS isn’t even the worst offender. I’ve seen backports of multiple fixes getting squashed into one commit for “a clean history” with all the useful commit messages ending up in one commit.

Many user stories I’ve seen implemented in a sprint take multiple days to write. Sometimes they have 5+ commits with a multitude of files changed and (if done right) each commit has an explanation why something was done or at least what was done. Having a granular view of changes also allows finding related changes quickly with less code to read.
If someone changes the implementation of a function call in one commit and it introduces a bug, it’s nice to have only that change instead of the entire class with it and changes in other files too. Additional changes mean now you have to read through more code to be sure that the function implementation change was not done due to a modification of the class or whatever else was changed which might be the actual source of the problem.

IMO squashing commits has its uses. It’s a tool in a toolbox, but it’s not the only tool.

CC BY-NC-SA 4.0

jjjalljs ,

That angular commit message is a crime.

My squashed commit messages typically enumerate everything I changed and why.

IMO squashing commits has its uses. It’s a tool in a toolbox, but it’s not the only tool.

I think we agree on this.

One case that has come up for me several times: working on a feature, committing as I go. And then I realize some of what I did won’t work or isn’t what product actually wants. Leaving those commits in the history that show the function doing the wrong thing would be misleading. Especially if that was never actually in production or left my local machine.

I guess I have an unspoken belief that every commit on main should work, but you could achieve that with tags instead.

I was recently spelunking to try to find why something in old code was the way it was. I found the commit where they changed the line, but it was orphaned from the larger context. The message didn’t say more than like “change field from footype to bartype”, but not why. So I had to try to piece together what other changes were part of this change. If it had been a single commit that showed them like adding the new field, new model, and whatnot, it would have been clearer to me that those things all go together.

Cwilliams , in git commit -m "minor fixes" +26858 -69429

<span style="color:#323232;">do_the_thing() {
</span><span style="color:#323232;">  git commit -am "$(date)"
</span><span style="color:#323232;">  git push
</span><span style="color:#323232;">} 
</span>
AnActOfCreation , (edited ) in Fitbit Clock Face
@AnActOfCreation@programming.dev avatar
solivine , in git commit -m "minor fixes" +26858 -69429
@solivine@sopuli.xyz avatar

When there’s a limit to the size of a commit message it does make it difficult to actually list all the changes, so sometimes this is all you can write.

I know in theory you’re meant to commit little and often, but in practice it doesn’t always work out that way.

PuzzledBlueberry ,

Even if you have a big commit, you can always write something more descriptive than this. And commit messages can be huge, so the limit shouldn’t be an excuse to write a useless message.

ekky ,

For those wondering how to exceed the 70 (80) recommended character limit and still follow best practices:

  1. Write the title on the first line, keep below 70 characters.
  2. Make two (2) newlines
  3. Write one or more descriptive paragraphs.

The first line will be shown as commit message, and the full text can usually be viewed by checking out the commit. Sentences can span multiple lines, but try to keep the line length below 70 characters for best readability.

This off the top of my head, so feel free to correct me if I’ve misremembered the best practices.

r00ty Admin ,
r00ty avatar

I generally write a single line summary and then a list of the specifics like:

Did stuff (except more detailed than that)
 - The first thing I did
  - Maybe some more detail about the first thing because there's a rationale to explain
 - The second thing I did
 - Third thing

Etc.

Sakychu , in Guys! Should I accept the offer? 😂

Sub for sub?

kubica , (edited ) in git commit -m "minor fixes" +26858 -69429
@kubica@kbin.social avatar

My personal favorite used to be "Long time no commit"

Croquette ,

I call that a checkpoint when I do it. But I do that on my branch that will eventually be squash merged.

MajorHavoc ,

I like to go for dark jam poetry, in those commits.

‘why is anything? can it be? desolation - oh wait, that variable is mistyped!’

marcos , in git commit -m "minor fixes" +26858 -69429

And I’d bet stuff is still broken!

MajorHavoc ,

Yeah. Definitely. If it was fixed there would be a commit with log ‘works now. WTF?!’

cyborganism , in My coding skill V/S My GitHub Repositories

As a side note, I find it incredible how much programmers have such little knowledge of how to use Git properly.

Even the most amazing developers I’ve worked with found themselves completely unable to manage their repos properly.

backhdlp ,
@backhdlp@iusearchlinux.fyi avatar

I refuse to believe that anyone other than Linus knows how to use git.

fidodo ,

Git is one of those things that take a bunch of learning to understand but is makes perfect sense once you do. I read like half of the pro git book and after that I was like it’s so simple! If course it still requires you to read half a book…

cyborganism ,

Yes! And the book is free. You can download it in PDF if you want.

For some reason I’ve always been able to visualize version control systems and workflows pretty well and understand how they work. I used to host a CVS server when I was in college back in 2001 so my teammates and I we could collaborate on our lab projects. Then moved on to Subversion, which I used for a very long time. Then I worked at a small company who used Canonical’s Bazaar and finally joined a big corp who used Git.

Throughout the years I simply developed some good practices that I applied to Git and that seemed to be enough. But, I’d occasionally get into this detached head state that I didn’t really understand. And this happened often with my teammates at that job. They’d end up with bizarre scenarios. So I started reading the book and experimenting and was soon pretty solid in Git and ended up being the SME on that topic for our team. Everyone would come to me when they got stuck.

I’m still learning new shit about Git even 8 years later lol. But, the step from being a newbie to a normal user is really big.

mrkite ,
@mrkite@programming.dev avatar

Yeah back before github existed, we used sourceforge to host opensource, and you had to use CVS. Then later Subversion.

cyborganism ,
KuroeNekoDemon ,

Oh boy are you in for a shock to know that I use git all the time when I want a piece of software that isn’t available in YaST2, Flatpaks or Appimages

backhdlp ,
@backhdlp@iusearchlinux.fyi avatar

I mean understand and know when or how to use every feature and command, I don’t mean using git clone https://github.com/foo/bar occasionally.

cyborganism ,

Cloning a repo to build the source code isn’t even remotely hard.

When you manage the repo of an entire team who work together on different release versions of a product using a very specific workflow with squash commits and cherry-picking? And when team members fuck up the repo’s history with a bad git pull/push? Yeah, it gets more complicated.

magic_lobster_party ,

If a team member can fuck up the history you probably should look into your merge policies.

cyborganism ,

Even with merge policies, if someone doesn’t understand what they’re doing or how it works, it won’t help.

Last project I worked on, we asked our developers to rebase on the parent branch and squash on their pull requests. But, they often encountered conflicts because they never updated their branch. They would pull the parent branch into their feature breach, or do a regular merge, or merge different other branches together and you’d end up with commit duplication everywhere. They didn’t have any discipline.

jarfil ,

Git is easy: the key part is picking a GUI you feel comfortable with.

expr ,

I know how to use git. It’s not that hard.

ArtVandelay ,
@ArtVandelay@lemmy.world avatar

Hi Linus!

Cold_Brew_Enema ,

I use Git all the time and still have no idea how to use it

some_guy , in Fitbit Clock Face

You’ve got the hour hand and the minute hand… they’re right there. What’s wrong? /s

cupcakezealot , in Guys! Should I accept the offer? 😂
@cupcakezealot@lemmy.blahaj.zone avatar

seems legit tbh

ilovededyoupiggy , in Fitbit Clock Face
@ilovededyoupiggy@sh.itjust.works avatar

Awful lot of strings that should have been integers. It is JavaScript, though, so I guess that tracks.

neurospice , in git commit -m "minor fixes" +26858 -69429

Could be worse:


<span style="color:#323232;">git commit --allow-empty-message -m </span><span style="color:#183691;">""
</span>
  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines