today i learn i can just do :
git show commitorrevision:path
to show the path at the time of commit or revision. i was just browsing github/gitlab before to see them 🤦♂️
so for example:
git show main^^:README.md
will show the README from two commit behind the main branch
Một lập trình viên đã tạo ra GitFlix, một trình giải mã video sử dụng Git để lưu trữ và phát lại video. 😮 GitFlix phân tách video 1080p thành các khung hình, nhét từng pixel vào các đối tượng Git và phát lại với tốc độ 60 fps. Điều thú vị là nó đạt được tỷ lệ nén lossless 7:1. Dự án này chủ yếu mang tính thử nghiệm và vui vẻ.
#git #video #codec #laptrinh #congnghe #gitflix #mãhóa #video
It's very weird to me that #Git status shows unstaged changes as red and staged changes as green. Red and green are colors for "bad" and "good" respectively, so it feels like my version control system is making a moral judgment about unstaged changes being "wrong" and staged changes being "correct." So I changed the colors to magenta and cyan. Magenta is close to red and can effectively signal volatility, and cyan is a calm color that can signal that the changes have been staged, or "saved."
✍️ New post on checking if a commit exists on a given Git branch, using `git merge-base --is-ancestor` or `git branch --contains`.
https://adamj.eu/tech/2025/09/03/git-check-commit-exists-on-branch/
It’s interesting that `git exclude` seems to be a relatively unknown feature.
(Then again, there is so much to git.)
It is so handy for personal and temporary files.
I use it for justfiles in other people’s projects, for example.
I also use it for a personal Django management command where I can run random code from.
Since my git blame config breaks if I don’t have `.git-blame-ignore-revs` in a repo, I also make that file if needed.
Check out git exclude if you haven’t yet!
My new article on Hugo modules vs. Git submodules is LIVE! 🚀 Learn how to streamline your website management. Read now: https://drmo.site/fnJbML #Hugo #Git #Submodules

git checkout thosepancakes
New favorite git command:
git brunch
In the process of migrating my projects from GitHub to Codeberg. Codeberg dashboard loading speed is so much faster than GitHub. I’m loading less resources while saving energy. Does anyone keep track of a list of folks who recently migrated to Codeberg?
#git branch S_1, S_2 re treated as sets , with the commits in em as the element of these sets
many of the git ops re just set theoretic element mapping ops ( read declaring set theoretic relationships amongst the subset of these elements)
for instance (rebase --onto) is defining a subset of S_1 e_i( if the re not a sequence of commits, one can cherry pick?) and moving them to S_2 ( or defining an onto relationship for e_1 between S_1 ,S_2)
A corresponding surjective function can be
a function from set A to set B is onto (surjective), : f:A→B such that for every element b∈B, there exists at least one element a∈A where f(a)=b. This can be denoted as ∀b∈B,∃a∈A such that f(a)=b
you can also write a #haskell function to do it ( untested)
```
import Data.List (nub)
-- Define a function type
type Function a b = a -> b
-- Check if a function is onto
isOnto :: (Eq b) => Function a b -> [a] -> [b] -> Bool
isOnto f domain codomain = all (`elem` mappedValues) codomain
where
mappedValues = nub (map f domain)
-- Example usage
main :: IO ()
main = do
let f :: Int -> Char
f x = if x `mod` 2 == 0 then 'A' else 'B' -- Example function
let domain = [1, 2, 3, 4] -- Set A
let codomain = ['A', 'B'] -- Set B
print $ isOnto f domain codomain -- Output: True
```
#todo list