Hacker Newsnew | past | comments | ask | show | jobs | submit | r1cka's commentslogin

I think people worry too much about branch names. Feature branches are usually ephemeral. Prefix your branch with your personal identifier so I know who is primary on it and worry more about the commit message which will live on indefinitely.


Yes, please just name the branch after the ticket/issue number so we can all get the context for it and call it a day


This. Linear has the one click or shortcut to grab the generated branch name based on the ticket.

With GitHub setup properly, on PR open, it auto comments the link to the ticket and links to the pr in the ticket.


This is probably my favorite Linear feature.

1) Cmd + shift + . -> Copy branch name

2) Build feature on that branch name

3) Build / Merge on Github and Linear closes the issue


I hate issue numbers for branch names. ISSUE-9482 doesn’t really provide much.

Ticket link should always be included in PR description.

But branch names should be descriptive like terraform_dev_create_instance

etc


I've worked in a couple of places with <issue ID>-<something descriptive> conventions, moderately useful


Yes, `issue-10-add-feature-X` style is best.


I have a little script that does this automatically - lists out Jira tickets assigned to me, then when I select one, creates a branch with the ticket number and the title, subbing hyphens for spaces and truncating if needed. It’s handy for when I want to list branches, I can filter on keywords I remember from the ticket name.


That's been my preference at most places I've worked. issue id so the branch gets linked to jira or whatever and a short description to find the branch later if needed.


we do:

  [feature/bug]/ISSUE-NUMBER-summary-of-issue
e.g.:

  bug/psi-456-broken-args-parsing


More or less the same here, but we (I?) prefix it with the username as well, so when pulling branches you know who created it.


I added a new TODO issue so that username can be configured in the branch name. gibr currently does not have support for username.

https://github.com/ytreister/gibr/issues/42


I implemented this in version 0.6.0 which was just released. https://github.com/ytreister/gibr/releases/tag/0.6.0 The issue assignee can be used in the branch name.


A nice benefit of prefixing by your-name/issue-1234-some-description is that many git clients will show it in a folder structure that way and it's easy to differentiate yours from other branches.


But the PR and git blame can tell you this so I would never look at the Branch name to find out this information


For me is useful when I run 'git fetch' from the command line. I don't use any graphical git client


gibr makes it super easy to do exactly this!


gibr makes it easy to do this and in a consistent manner


That is what gibr does, it helps you do this with ease


having feature/username/id-desc is good though. Because at least you can identify why the branch is there. That they are ephemeral doesn't mean that people actually clean them up...


Either it has commits I care about or it doesn't. Either way, I'm not going to consult the branch name.

If it has commits I care about, then it stays. If it doesn't, It goes. I'm only deleting on the server afterall, people can just push it back.


I understand, but that means you need to review the commits and code changes and do not have the context which could be found either in the issue title, description, etc.


Exactly, people tend to leave messes. It makes it much easier to know what the branch was for and have more piece of mind when you want to delete it.


Correct, I use uuids as branch names, to the chagrin of my teammates


This would infuriate me. You have to index that guid to something yourself. Why wouldn't you at least give yourself some help (your name, issue number, type of change, area of project, etc). Why make your job harder than it needs to be?


Why would you do this!!!!!


Great point


Commit message should be ephemeral too. Squashing after a PR should be the default. Only at that moment does the PR/Commit message matter.


Hard disagree here. GitHub does encourage this sort of thing, but even there for my PRs to be easily reviewable, I like to keep my commits organized and with good messages explaining things. That way the reviewer can walk the commits, and see why each thing was thing was done.

I also like it for myself, when I’m going over my own PRs before asking for a review - I will often amend commits to ensure the work is broken down correctly, each thing that should go together, does.

In a way, stacked PRs are just a higher-level abstraction of this too - same idea, keep work that goes together in the same place.


Fully agree with you here. Blunt squashing is a bandaid to the problem of lazy commits. Commits should IMHO be specific and atomic. Like fixing one bug or implementing one feature. Obviously there are cases where this ideal isn't practical, but the answer is still not squash everything, it's to think for 10 more seconds about the commit and do your best.


Yeah, I think over use of GitHub, which seems to encourage squash-merging, has led to this where a lot of people I’ve seen treat a PR as essentially one commit - because it ends up being one in the end.

If you keep your PRs small I guess the end result is the same, but even then I like things in individual commits for ease of review.


I want to see detailed atomic commits during PR review, and once it's reviewed I'm happy to have it squashed. If the PR produces so much code/changes that main branch needs detailed atomic commits for future reference, then the PR was too large to begin with, imo.


I do agree that this is a good compromise. For me, if I do a git blame and eventually can find the PR that led to change, if it has nice clean commits, that’s good enough.


> If you keep your PRs small

Its not a if. it's necessary for the sake of people reviewing your code. Unless you work alone on your pet project and always push to master you never work alone.


Right, small PRs are great. And they are even better with a nice commit history for me to follow. One does not exclude the other.


Did you mean before the PR? Why would anyone have a review system if you change the code after review?

Hopefully the commits are already squashed and rebased before review to value reviewers' time.


The argument I've always heard for this was issues with code, not the event. If for a period of time you have a bug in your code, with event sourcing, you can fix the bug and replay all the events to correct current projections of state.


What if your correction renders subsequent events nonsensical?


There is a very real chance of this happening, and two choices.

One - bake whatever happens into your system permanently, like 99% of all apps, and disallow corrections.

Two - keep the events around so that you can check and re-check your corrections before you check in new code or data.


I've found referring to them as implicit vs explicit contracts conveys the idea and is more well received than proclaiming someone's ignorance.


You aren't missing anything. It's just marketing so GitHub/Gitlab stay in the main conversation when DevOps comes up.


DuckDB targets analytical workloads. Your question sounds like your workload is transactional to me, so I'd recommend sticking with SQLite.


Agree, in fact this wonderful book calls this out, stating:

  As DuckDB is an analytics database, it has only minimal support for transactions and parallel write access. You therefore couldn’t use it in applications and APIs that process and store input data arriving arbitrarily. Similarly when multiple concurrent processes read from a writeable database.


Looks like they took your advice?


They did! Nice! Those definitely weren't there earlier today!


You are basically saying "Don't use any native apps, ever". With chrome profiles, links are just opened in whatever profile window was last active (this is on Mac OS, but I think others are the same). It's the one thing keeping me with chrome (brave).


Linux is definitely not the same. The browser instance that was opened first wins, unless you start it with `--no-remote` flag.


Care to share your Libre Calc spreadsheet formulas?


I'd be glad to, but I'm not sure yet how helpful it would be to do so here, without just sharing the full spreadsheet. Which I would need to clean up and anonymize first. It may be very particular to my needs. I drew inspiration from many other "YNAB spreadsheets" (searching reddit etc.) I can say that learning the SUMIFS formula to sum the relevant transactions for a given envelope was a big key to making it work well. The other details are polish around it. I'm afraid that this might not come across very clear. I found that the more that I desired a certain feature and searched for how to do it in Excel or Google Sheets (or Libre Calc, but there is less specific resources for that) then it gave me the next bit that I needed.


My problem is opening links from apps. Sometimes I want a link in Slack (or other desktop apps) to open in my personal profile and sometimes I want it to use my work profile. With Brave/Chrome, the link will open in whatever profile window is active. I can't find a way to make this work with Firefox.


Have you tried making a different desktop entry/shortcut for each Firefox profile and then setting a browser picker as your default browser?

- Junction (Linux browser picker): https://github.com/sonnyp/Junction

- Finicky (macOS browser rule setter): https://github.com/johnste/finicky and Browserosaurus (macOS browser picker): https://github.com/will-stone/browserosaurus

- Hurl (Windows browser picker): https://github.com/U-C-S/Hurl


This is years ago now, but every ampersand in my passwords came across wrong. I can't recall if it was missing or url encoded, but even passwords weren't safe.


I'm still finding passwords in Bitwarden to old accounts that have `&amp;` in them. Thanks, LastPass!


Your password is safely html encoded for distribution on the web.


Like on Hacker forums? :)


That is especially surprising, considering that passwords are more than likely going to contain special characters.


LastPass's own generator puts them in there.


Avoid such trouble is why I want to avoid using symbols for password. Just use more alphanum characters for strength.


I want to as well, but annoyingly there are many sites that insist on a "special" character because their strength measure says "low" for the 20 character alphanumeric string I generated %-}


My favorite is when they actually limit what special characters you can use. Must include 1 of x special characters. Why? I always just assume they baked their own password storage and couldn't figure out how to handle the whole set of special characters


Multiple times I've found that this is caused by a web application firewall that is intended to mitigate SQL injection attacks. So they disallow the characters that would commonly be used in those attacks.


Interesting, I had never considered that


On those sites, I generally insert the same fixed uppercase-and-symbol string on my zbase32ed-entropy passwords. Zbase32 tends to produce numbers already, and that combo tends to satisfy the silly sites.


Or just use proper tools that work.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: