Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cerved
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
49 ms
·
661.
▲
by
cerved
5y ago
In the git bash on windows environment it clearly states that you're in the middle of a rebase. If this happens a lot you could implement that same functionality in your environment
662.
▲
by
cerved
5y ago
It may not be the most mnemonic but it clearly says right in the CLI what you're supposed to do (use "git restore --staged <file>..." to unstage)
663.
▲
by
cerved
5y ago
Most people do not even seem the slightest inclined to bother. It's a sad attitude IMHO
664.
▲
by
cerved
5y ago
Tbf, rewriting local history makes a ton of sense but with great power comes great responsibility
665.
▲
by
cerved
5y ago
noun 1. a large piece of something, especially food, cut or broken off a larger piece.
666.
▲
by
cerved
5y ago
at least if you are a carpenter
667.
▲
by
cerved
5y ago
you can also set git config commit.verbose true to always have this behavior
668.
▲
by
cerved
5y ago
it's very easy from the CLI. Much easier than from GUIs actually git diff git diff --staged git restore --staged --partial git commit you can also add commit hooks to reject changes like conflict markers
669.
▲
by
cerved
5y ago
true, if they are modifications and deletes but not additions it'd be trivial to modify that behavior to refuse to continue in such a case if you want double seatbelts also, if the changes were staged they were recorded in the database
670.
▲
by
cerved
5y ago
I apologize, that wasn't my intention. But it's not really surprising that one can't commit empty directories, one can't commit directories at all. Git is a tool for version controlling the lines and bytes of source code
671.
▲
by
cerved
5y ago
use git stash instead to unstage changes not committed to the index and you'll never lose anything ever again
672.
▲
by
cerved
5y ago
That's why it's a flag. You could do git reset HEAD^ && git stash instead Also, git reset ---hard HEAD^ deletes nothing. The commit HEAD was pointing is not deleted. You have to work really hard to delete that commit acci
673.
▲
by
cerved
5y ago
I see. But then why the record that structure in the index? Isn't it enough to have it remain in the working directory? Or if you need it in the index, just the canonical empty .gitignore?
674.
▲
by
cerved
5y ago
Git takes stability and extensibility seriously. Your demands and expectations on version control may be radically different from mine. Empty directories do not contain files or information, it's entirely reasonable for a VCS to omit s
675.
▲
by
cerved
5y ago
git mergetool or git checkout --ours/theirs && git add .
676.
▲
by
cerved
5y ago
Git checkout branch means change the entire working tree to the reflect the state of the branch and git checkout file, checkout the state of that file in HEAD. Both commands to the same thing, change the state of your working tree to reflec
677.
▲
by
cerved
5y ago
The UX philosophy is radically different. One presupposes that you understand a lot more of the underlying system. The other tries to focus on what it is what you want to do, as opposed to how. Mercurial is less intimidating if you don'
678.
▲
by
cerved
5y ago
It's a handful of commands, very well documented with tons of SO questions that is one search away if you can figure it out yourself. It's something I use all day, every day. I'd say it's worthwhile to learn if your dai
679.
▲
by
cerved
5y ago
The CLI doesn't obscure as much as presupposes that you understand internal workings of git. All GUIs are not created equal. The JetBRains GUIs are pretty good. Others try and impose git "their way" and just invite creating a
680.
▲
by
cerved
5y ago
Commits are immutable, itś incredibly hard to destroy data that has been committed. Even if they become loose objects, Git is very conservative when it comes to deleted that. If you have uncommitted data, git will refuse to do lots of opera
681.
▲
by
cerved
5y ago
it's often more fun to read the agitated ranting
682.
▲
by
cerved
5y ago
> And if stuff is awkward then … maybe you’re doing it wrong? No one liked how any of this worked, but just accepted it as a fact of life, like how you would accept that it really sucks that it rains today. That’s an attitude I’ve seen m
683.
▲
by
cerved
5y ago
why bother with a message if it's just garbage?
684.
▲
by
cerved
5y ago
I only glanced at what you did but if this operating matrices or vectors, there are often crazy optimizations that can be made for CPU cache
685.
▲
by
cerved
5y ago
OP made no mention of software and mentioned Sun and Motorola, so I don't think they made any point specifically about software. It may also be relevant to point out that Amazon is first and foremost a retailer, unlike the other compan
686.
▲
by
cerved
5y ago
The point was that in map and reduce it's clear what's being done and what's being returned, especially in a typed language. Ideally you're also in an environment that doesn't allow for side effects, in which case,
687.
▲
by
cerved
5y ago
I used to work in IT sales and I'm not surprised
688.
▲
by
cerved
5y ago
loops are harder to read. What does it do, map, reduce, send emails to grandma? In JavaScript, the reduce callback is created once and called repeatedly. For loops are pretty much always the fastest possible way because they use mutable sta
689.
▲
by
cerved
5y ago
Guido?
690.
▲
by
cerved
5y ago
I always try and improve existing answers with edits. Often just adding important context when the answer is just a line of bash and adding links to source documentation. There's very little gamification incentive to do so and often th
More ›