Most active commenters
  • eru(4)
  • baq(3)

←back to thread

848 points thefilmore | 25 comments | | HN request time: 1.553s | source | bottom
1. ratatoskrt ◴[] No.43970008[source]
To be fair, Git itself is a bit of a pain, and GitHub's main achievement is/was to make it somewhat bearable.
replies(3): >>43970020 #>>43970066 #>>43970187 #
2. casenmgreen ◴[] No.43970020[source]
I regard the Git docs as being fully equal to scientific Wikipedia articles.

Everything is fully and completely explained, in terms which mean nothing.

replies(1): >>43970349 #
3. mmis1000 ◴[] No.43970066[source]
In some sense, git is actually like advanced zip versioning system. A commit is literally just a snapshot of code base except it tell you what is the previous version of this version.

Also, git store the files in a smarter way so file size won't explode like zip versioning.

replies(1): >>43970360 #
4. spookie ◴[] No.43970187[source]
To be fair, most of the its difficulty is realized when you're stuck with a teammate rewriting history. Who, much like anyone anyone doing the same, hasn't bothered reading a book explaining things.
replies(3): >>43970280 #>>43970348 #>>43970388 #
5. baq ◴[] No.43970280[source]
If you don't rewrite history in git, I don't want to bisect in your repos.

If you push rewritten history to master, you're a git.

Conclusion: learn your tools.

replies(2): >>43970414 #>>43988211 #
6. tester756 ◴[] No.43970348[source]
No, git's CLI is terrible mess.
7. eru ◴[] No.43970349[source]
I find both Wikipedia and Git docs typically more useful than this. Much more.

(They ain't perfect, of course.)

replies(1): >>43971462 #
8. eru ◴[] No.43970360[source]
> A commit is literally just a snapshot of code base except it tell you what is the previous version of this version.

Or previous versions. Plural. Yes.

Well, that's one half of git. The other half is tooling to work with the snapshots and their history, eg to perform merges.

replies(1): >>43972429 #
9. jamienicol ◴[] No.43970388[source]
That problem is solved by preventing forced pushes. Rewriting history locally is encouraged.
replies(1): >>43970859 #
10. mkesper ◴[] No.43970414{3}[source]
The modern workflow is just to let GitHub squeeze yor shit commits into one and then rebasing that.
replies(3): >>43970622 #>>43971671 #>>43976065 #
11. baq ◴[] No.43970622{4}[source]
Hardly anything modern about it, but it's a way of keeping a somewhat sane history. Certainly better than merging 'fix' 'fix' 'fix comments' into master.

The thing is, we could have done better (and have been) since before git even existed.

12. Tainnor ◴[] No.43970859{3}[source]
Prevent forced pushes on protected branches (develop, main, hotfix etc.). I don't care if somebody force pushes their private feature branch.
replies(1): >>43971661 #
13. casenmgreen ◴[] No.43971462{3}[source]
https://en.wikipedia.org/wiki/Declination

"In astronomy, declination (abbreviated dec; symbol δ) is one of the two angles that locate a point on the celestial sphere in the equatorial coordinate system, the other being hour angle. The declination angle is measured north (positive) or south (negative) of the celestial equator, along the hour circle passing through the point in question."

Anyone who doesn't know what declination is, know from reading the introductory paragraph of this scientific Wikipedia article?

Anyone? no? :-)

I rest my case, m'lud.

replies(2): >>43971561 #>>43972293 #
14. squigz ◴[] No.43971561{4}[source]
> Anyone who doesn't know what declination is, know from reading the introductory paragraph of this scientific Wikipedia article?

Why should this be a metric one would want Wikipedia to meet? It's an encyclopedia, not an astronomy course.

Of course, the brilliance of Wikipedia is that if you think you can write a clearer intro, you can do so! You could even add it to the simple language version of the page - https://simple.wikipedia.org/wiki/Declination

15. cmrdporcupine ◴[] No.43971661{4}[source]
Force pushing onto PR branches is the only way to make the commit history in them sane.

But GH's PR process is broken anyways. I miss Gerritt.

16. cmrdporcupine ◴[] No.43971671{4}[source]
There are legit reasons to have a series of commits within one PR, and rebase and merge them as is, and use amend/fixup and force pushes to maintain them cleanly.

It's not my favourite process, but...

17. executesorder66 ◴[] No.43972293{4}[source]
I've never heard of it before, and it makes perfect sense what it is from that intro.

On a celestial sphere (planet, star, etc) the declination angle (being 0 is at the equator, being 90 degrees is the north pole of the sphere, being -90 degrees, is at the south pole).

You also need another angle known as the "hour angle" to locate a point on the sphere. It doesn't explain what that is, but as can be seen on Wikipedia, you can easily click on that word to go to the entire page that explains what it is.

What don't you understand?

replies(1): >>43979381 #
18. mmis1000 ◴[] No.43972429{3}[source]
On the other hand, the other part of git aren't really strictly work only for git. Create and apply diff also works for plain folder without git history. They are big part of the ecosystem while not bound to git in a strict way either.
19. vvillena ◴[] No.43976065{4}[source]
The "squash everything" mantra turns git commit history into a series of snapshots devoid of any logical notion about how code evolves.

Squashed commits are strictly worse than plain, non-fast-forwarded merges from rebased branches.

replies(1): >>43976294 #
20. baq ◴[] No.43976294{5}[source]
Depends on your commits. If it’s untested noise I’d much rather they’re squashed so bisect doesn’t meander in trash.
replies(1): >>43976506 #
21. vvillena ◴[] No.43976506{6}[source]
Bisecting with --first-parent takes care of this.
22. eru ◴[] No.43979381{5}[source]
Well, you misunderstood / mis-guessed what celestial sphere means. Interestingly enough, your mis-understanding also sort-of works.
replies(1): >>43982726 #
23. executesorder66 ◴[] No.43982726{6}[source]
Well that was a whole other topic. And luckily it links to a page that explains the whole topic of what a "celestial sphere" is. Going to the page, I see I was indeed wrong about what it was, but now I see it is an abstract sphere, with a radius that can be whatever size you want, and that is centered on the Earth, or on the observer.

Once again, not so difficult to figure out even if you have no experience in the specific technical field of a Wikipedia article. So I have no idea what /u/casenmgreen's problem is.

replies(1): >>43990949 #
24. spookie ◴[] No.43988211{3}[source]
Not a single soul besides the one rewriting history knows what they're in for after the fact.

It's a recipe for disaster.

Unless you mean squashing commits, which I don't consider rewriting history, just a retelling of the fact. Still, it's something one can only do very sporadically, or at known periods of time. I

'm sure others would be more pedantic about it and this wasn't clear above.

25. eru ◴[] No.43990949{7}[source]
I think I see casenmgreen's is trying to get at. But they just picked an example that (to you and me) just isn't all that complicated nor bad.