News for hackers. Stuff that matters.
Re:Oh Shit, Git by layer8 on Saturday June 25, 2022 @08:46AM (#31874854)
Conceptualizing a commit graph with branch/tag labels is the easy part. What gets messy is operations regarding remote vs. local (as you mention) and regarding the various local state one may have (working directory, index/staging). Then there’s also the issues that arise with merging, but you have those with every VCS.
Re:Oh Shit, Git by neandrake on Saturday June 25, 2022 @08:49AM (#31874868)
I love mercurial’s solution of having phases for commits. Anything you created locally is Draft phase and can be mutated without “force”. Anything which was pulled or pushed is automatically marked as Public and is not easily mutated. Visualizing the commit graph also colors commits based on phase making it really easy to get a grasp of what’s going on.

Is there an extension or something for Git to have similar behavior to this?

Re:Oh Shit, Git by layer8 on Saturday June 25, 2022 @08:59AM (#31874937)
Instead of using colors, a visualization that can be combined with branch colors would be nice. For example using bold for remote (“public”) commits, or dashed lines for local (“draft”) commits.