@jnareb@fosstodon.org
@jnareb@fosstodon.org avatar

jnareb

@jnareb@fosstodon.org

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

pluralistic, to random
@pluralistic@mamot.fr avatar

Today's threads (a thread)

Inside: You were promised a jetpack by liars; and more!

Archived at: https://pluralistic.net/2024/05/17/fake-it-until-you-dont-make-it/

#Pluralistic

1/

jnareb,
@jnareb@fosstodon.org avatar

@pluralistic In regards to "The dancing robot on stage at the splashy event is literally a guy in a robot-suit" I can only say WTF? Boston Dynamics had created human like (and dog like) robots, and they work.

jnareb, to passkeys
@jnareb@fosstodon.org avatar

I'm very disappointed that passkeys (allegedly) got enshittified before I could start to try to use them: https://fy.blackhats.net.au/blog/2024-04-26-passkeys-a-shattered-dream/

#passkeys #Enshittification #passwords

jnareb, to microsoft
@jnareb@fosstodon.org avatar

Microsoft 365 recently introduced a massive anti-feature. You can now EITHER save document locally and do not have autosave, or save document in their cloud, and do not have local copy.

What f&*%ng idiot have accepted this change... #Microsoft #MSWord

jnareb,
@jnareb@fosstodon.org avatar

I'm not sure if it is true, or gaslighting, but apparently Word (Office 365 version) never had local autosave feature (though perhaps Word 2007 etc. did had it):

https://answers.microsoft.com/en-us/msoffice/forum/all/how-to-autosave-local-to-pc-instead-of-to-onedrive/8631fa3c-3af4-49f7-8f83-b80c3f3389e8

b0rk, to random
@b0rk@jvns.ca avatar

working on a draft of a git cheat sheet, what's missing?

most interested in relatively "basic" things in git that you always forget how to do. Right now I think the push/pull section is by far the weakest

jnareb,
@jnareb@fosstodon.org avatar

@b0rk In "code archeology" section, git log $FILENAME should be perhaps replaced by git log --follow $FILENAME.

The explanation for git log -S is wrong: it is git log -G that searches the diff (and is slower), while git log -S finds those commits where number of matches changed. See https://git-scm.com/docs/git-log#Documentation/git-log.txt--Sltstringgt

b0rk, (edited ) to random
@b0rk@jvns.ca avatar

been trying to list every piece of state in your git repository that you need to be careful about. So far I have:

  • your current branch
  • if you're in detached HEAD state
  • staged files
  • unstaged & untracked files
  • whether or not you're in the middle of a merge (or rebase, or cherry-pick)
  • if you're in the middle of a rebase, which stage of the rebase you're at exactly
  • what you have in the stash (since stash entries are deleted when you stash pop)

what did I miss?

jnareb,
@jnareb@fosstodon.org avatar

@b0rk Most of this information is available via git status... and if you are using shell or shell multiplexer usually also in shell prompt; if you are using GUI or IDE plugin, it is available in the status bar.

jnareb, to random
@jnareb@fosstodon.org avatar
  • merge.log set to true (or to 100),
  • rebase.autoSquash for use with commit --fixup
  • I don't use merge.autoStash and rebase.autoStash, but it might be useful for others
jnareb, to random
@jnareb@fosstodon.org avatar

@pocket_recommends Terrible, terrible experience with [forced] account upgrade of #Pocket - after logging to Mozilla account, I landed on Pocket with no saves at all!!!

Only after logging out and logging in, and then trying to export my saves I have somehow finally landed on the correct account, with my saves present.

jnareb, to random
@jnareb@fosstodon.org avatar
  • merge more stable branch into less stable branch; for example avoid merging 'main' into topic branch - rebase topic branch on top of 'main' instead

  • decide upfront if you want to merge topic branches with --no-ff

  • configure merge.log true

jnareb,
@jnareb@fosstodon.org avatar

@Knusper @mac The 'head' is sometimes called 'tip of the branch' if you want to invoke the meaning of branch as a pointer to the graph of revisions, as a tip where new commits are created.

codinghorror, to random

“An item that started out very ordinary, through repeated lack of use eventually becomes … seen more as a treasure” https://medium.com/magnetic/52-things-i-learned-in-2023-a3bbb9f9323d

jnareb,
@jnareb@fosstodon.org avatar

@codinghorror From the list:

The UK government recently changed the law to ban company names containing computer code, after Michael Tandy of Hatfield registered a company called “; DROP TABLE “COMPANIES”; — LTD,” which could theoretically erase the companies house database. [Alison Thewliss MP]

A real life https://bobby-tables.com/ ?

b0rk, to random
@b0rk@jvns.ca avatar

i'm trying to figure out what high-level abstraction git presents. I think it's something like this?

(yes, all of this is "wrong", but I feel like git's UI does a lot of work to try to provide this abstraction in an inconsistent and leaky way)

jnareb,
@jnareb@fosstodon.org avatar

@b0rk I would say:

  • commits are both snapshots, and diffs (changesets), and you can switch between these views as needed (see e.g. git-bisect or git-reset, versus git-rebase, git-cherry-pick, or git-revert)

  • commits can be treated as mutable (amending a commit, interactive rebase), but they are not: you are re-writing them, that is creating new modified copy (and forgetting old) - that's why you can go back with the help of reflog

jnareb,
@jnareb@fosstodon.org avatar

@dr2chase @graydon @timbray @b0rk Errr, what? git-bisect was created to enable bisection into highly non-linear history (like Linux kernel)

jnareb,
@jnareb@fosstodon.org avatar

@dr2chase @graydon @timbray @b0rk I think the quality of commits (most importantly: their small size, and being self-contained) matters more for easy git-bisect run than linear history.

git-bisect will be log fast even on large non-linear history.

Though having non-linear history might mean that you would have to learn about git bisect skip ;-)

jnareb,
@jnareb@fosstodon.org avatar

@codinghorror @b0rk @vitriolix The question is how much of Git complexity is "accidental" (and could be fixed, thought backward compatibility might stand in the way), and how much is inherent in being a distributed version control system, and in allowing Git its power.

jnareb, to random
@jnareb@fosstodon.org avatar

About "load the commit listings lazily":

Git uses index file where every object within a pack is listed, and modern git can create multi-pack commit where every object is listed.

There is also serialized commit-graph, where one of chunks contains all commits SHA-1 sorted, and indexed.

b0rk, (edited ) to random
@b0rk@jvns.ca avatar

if you're an infrequent command line user -- what text editor do you use if you need to occasionally edit a file on the command line (other than vim/emacs)?

curious about what people use to edit a git commit message etc

if you picked 'other', I'd love to hear what you do in the replies!

jnareb,
@jnareb@fosstodon.org avatar

@b0rk Depends on the machine. Usually either pico/nano, or vim. On MS Windows I used to use GitExtensions editor, on Linux I used to use GNU Emacs as GUI editor but with gnuserver - invoked from command line to open in existing Emacs window.

b0rk, to random
@b0rk@jvns.ca avatar
jnareb,
@jnareb@fosstodon.org avatar

@b0rk There is third-party git-imerge tool that can help with rebasing a very long string of commits (and stop in the middle, and share partially rebased/merged state). Unfortunately, it looks like it is not actively developed, though I might be wrong.

https://github.com/mhagger/git-imerge

b0rk, to random
@b0rk@jvns.ca avatar

today I'm thinking about the tradeoffs of using git rebase a bit. I think the goal of rebase is to have a nice linear commit history, which is something I like.

but what are the costs of using rebase? what problems has it caused for you in practice? I'm really only interested in specific bad experiences you've had here -- not opinions or general statements like “rewriting history is bad”

jnareb,
@jnareb@fosstodon.org avatar

@b0rk It is not either merge or rebase. I often use both: rebase to keep up the feature branch up to date (or even interactive rebase to clean up history), and merge to actually join changes.

With merges, you should have git log --first-parent as nice summary of changes.

b0rk, to random
@b0rk@jvns.ca avatar
jnareb,
@jnareb@fosstodon.org avatar

@b0rk

  • the dots thing working for diff is, I think, to be able to copy and paste line from git fetch output to git

  • refspec for fetch tells Git how to map references in remote repository (usually branches or branch, like refs/heads/main) into references in your repository (usually remote-tracking branches or branch, like refs/remotes/origin/main); compare how they look like when you clone the repository vs when you clone repository in the mirror mode.

jnareb,
@jnareb@fosstodon.org avatar

@b0rk “remote-tracking branch” vs “branch that tracks a remote”: one tracks branches in remote repository, one tracks the remote-tracking branch ;-)

jnareb,
@jnareb@fosstodon.org avatar

@b0rk I use it to push all my local feature branches to remote with git push origin : - here : is a special kind of refspec

Before git push got --delete option it could be used to delete branch in remote repository with git push origin :branch-to-delete (push empty into branch).

If GitHub/GitLab/... is configured so that 'main' branch is protected and you cannot push there, you can use git push origin main:other-name and then create pull request/merge request.

Not usual cases.

jnareb,
@jnareb@fosstodon.org avatar

@b0rk Also, I think if you want to share git-notes (for example to add information to existing commits, such as that it was the cause of the bug, and was fixed later), or git-replace (which can be used to connect current history with historical repo converted from some other SCM), you need to hand-craft refspec - as they both use references which are not branches.

https://git-scm.com/docs/git-notes
https://git-scm.com/docs/git-replace

jnareb, to random
@jnareb@fosstodon.org avatar

From @pluralistic :

"I want our city inspectors to make sure that contractors install vapor barriers, but to not demand superfluous electrical outlets.

Which raises the question: where do regulations come from? How do we get them right?"

https://pluralistic.net/2023/10/23/getting-stuff-done/

jnareb, to random
@jnareb@fosstodon.org avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • ethstaker
  • mdbf
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • everett
  • khanakhh
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • JUstTest
  • GTA5RPClips
  • osvaldo12
  • modclub
  • Leos
  • tacticalgear
  • ngwrru68w68
  • cubers
  • cisconetworking
  • normalnudes
  • anitta
  • tester
  • provamag3
  • lostlight
  • All magazines