(˃ 𖥦 ˂) wowie ! don'tcha just miss them old school marquees? (˶˃ ᵕ ˂˶) .ᐟ.ᐟ

Git


Jan. 12, 2025

Branching out with a previous commit in a GitHub project

just a lil guide for my future self when i inevitably forget this again (and it’s probably still wrong oops-)

- Steps:

- Find the commit you want to revert to & copy its hash:

- Return to your open project:

for me, i was working with a locally-cloned copy in VScode, connected to the remote repo’s main branch, and was up to date with all of the changes made.

Dec. 23, 2024

PACK files in .git - a rabbit hole

- so, how did we get here? :see_no_evil:


git stores all historical changes to a repo in a PACK file inside the hidden .git folder. This allows restoration of previous repo states in the future.

However, if you upload files like binaries, photos or videos, this file gets VERY large, even if you delete them in a future commit.

- enter: git-filter-repo

Luckily a tool exists called git-filter-repo that you can download and use (python script) to analyse your PACK file, and filter out any unwanted bits (e.g. file extensions, paths, etc.). This can dramatically reduce the size of the PACK file.