TIL: You can use `git show :filename.xyz` (i.e., a file name with a colon prefix) to show the staged contents of a file, before committing.
For example, I made several changes to an SCSS file and staged only a few of the changed lines (using `git add -p foo.scss`). But since I also keep a CSS file in the repo that contains the result of the SCSS, I needed a way to generate the CSS with _only_ the staged lines and none of the unstaged ones.
Easy:
git show :foo.scss | sass - foo.css
GitLab 18.2: Duo Agent Platform for VS Code and JetBrains released as beta
The GitLab Duo Agent Platform for IDEs has a connection to JetBrains IDEs and VS Code, can handle MCP and offers agentic chat and agent flows.
New #TIL post on #BurgeonLab
https://www.burgeonlab.com/blog/my-first-github-pull-request/
My beginner's guide on how to make a pull request on github.com. It's my first try at it and I'm pleased to say the dev of the repo I'm contributing to accepted my PRs and merged them swiftly! Will tackle a larger #pullrequest this week regarding #retext.
Show HN: ggc – A terminal-based Git CLI written in Go
Link: https://github.com/bmf-san/ggc
Discussion: https://news.ycombinator.com/item?id=44582730
#git submodules are kinda terrible. Why do I again have to write 100 lines of
to have it do what `git submodule sync|update|whatever` should do itself:
- ensure the correct branch is checked out in the submodule at the correct commit pinned in the toplevel repo
- ensure that branch correctly follows the remote branch
- ensure remote.<name>.fetch is correctly set so git fetch doesn't behave weirdly
- ...
Najbardziej lubię, jak w #git bisect problematyczna zmiana jest gdzieś blisko środka, więc wciąż dostaję jakieś "dobre" i "złe" wersje, i nie muszę się martwić, że na którymś kroku spierpsułem.
No, chyba że mój skrypt jest błędny, i nie zawsze poprawnie odtwarza błąd…
My favorite kind of #git bisect is when the breaking commit is somewhere near the middle, so you keep getting both "good" and "bad" commits, and don't have to start worrying that you've messed up.
Well, unless it turns out your reproducer is bad, and it doesn't always reproduce the failure…
Pull requesty są dobre, ale rzeczywiście, gdy są bardzo duże, to sytuacja robi się nieciekawa. Istnieją sposoby, jak sobie z tym poradzić - tutaj autor opisuje Stacked diffs, które wydaje się najbardziej naturalne, choć wymaga pewnej dyscypliny. Warto znać i wyciągnąć wnioski.
Creating NPM Package with ReactJS: The Complete Step-by-Step Course to Build, Test, and Publish React Libraries http://leanpub.com/courses/leanpub/creating-npm-package-with-react-javascript by CodeSweetly is the featured online course on the Leanpub homepage! https://leanpub.com #ComputerProgramming #Javascript #React #Software #Git #Cookbooks #WebDevelopment #NonFiction
And yes, whoever uses #discord for #documentation and #versioning instead of a goddam #git [doesn't have to be @github / #GitHub or @gitlab / #GitLab or @Codeberg / #Codeberg or even @gitea / #Gitea - just use any git
and write down your documentation in a useable format like #Markdown or goddamn ASCII plain text FFS] should be banned for life from #coding, working in #IT or contribute to #FLOSS.
Artisanal handcrafted Git repositories
Link: https://drew.silcock.dev/blog/artisanal-git/
Discussion: https://news.ycombinator.com/item?id=44586064