News for hackers. Stuff that matters.
Re:Why SQLite Does Not Use Git by Ace17 on Wednesday April 11, 2018 @01:37AM (#16808342)
So you're not using checkout, reset, and diff?
Re:Why SQLite Does Not Use Git by amerkhalid on Wednesday April 11, 2018 @09:53AM (#16811053)
Good point, forgot about checkout, diff, clone, blame, add, rm, rebase, init, and probably a few more.

Haven't used reset personally though but only when trying to fix someone's repo.

Re:Why SQLite Does Not Use Git by e12e on Wednesday April 11, 2018 @01:56AM (#16808409)
Or fetch?
Re:Why SQLite Does Not Use Git by OJFord on Wednesday April 11, 2018 @02:11AM (#16808481)
I think a lot of people ignore fetch and only ever pull.
Re:Why SQLite Does Not Use Git by e12e on Wednesday April 11, 2018 @12:27PM (#16812744)
I think it's the most important sources of my cognitive dissonance around git. It strengthens the illusion that a working directly is somehow related to a git store, which it really isn't.

You have a working directly/checkout - that can be: identical (apart from ignored files) to some version in git; or different.

If it's different ; some or all changes can be marked for storing in the git repo - most commonly as a new commit.

It's a bit unfortunate that the repo typically is inside your work directory/checkout - under '.git' along with some files like hooks, that are not in the repo at all...

Re:Why SQLite Does Not Use Git by TomK32 on Wednesday April 11, 2018 @02:44AM (#16808631)
But you'd have to stash before pull. At least with my config where a pull will rebase automatically.
Re:Why SQLite Does Not Use Git by OJFord on Wednesday April 11, 2018 @08:58AM (#16810623)
I use `git config pull.rebase true` too, but that doesn't mean you _have_ to stash first, just as rebase manually wouldn't - depends if there's a conflict.

Same is true of merge-based pull.

Re:Why SQLite Does Not Use Git by e12e on Wednesday April 11, 2018 @02:50PM (#16814218)
Except for saving some typing, is there any benefit to stash over local branches?

In other words, shouldn't git just fix ux for branches and rip out stash?

Re:Why SQLite Does Not Use Git by OJFord on Wednesday April 25, 2018 @01:50AM (#16918887)
So "some typing" would be:

    # git stash:
    prev_ref="$(git rev-parse --abbrev-ref HEAD)"
    git checkout -b wip-stash
    git add .
    git commit -m 'wip stuff'
    git checkout "$prev_ref"
    
    # git stash pop:
    git checkout wip-stash -- .
    git checkout -D wip-stash
It's quite a considerable saving. I suppose by "fix UX" you mean make it so the saving would be less anyway, but I think really they're just conceptually different:

    - branch: pointer to a line of history, i.e. a commit and inherently its ancestors
    - stash: a single commit-like dump of patches
If stashing disappeared from git tomorrow, I think I'd use orphan commits rather than branches to replace it.
Re:Why SQLite Does Not Use Git by _pmf_ on Wednesday April 11, 2018 @02:48AM (#16808648)
pull == "just fuck my shit up"