How to remove large files from `git` commit history?

First, analyze the git storage in the directory with: git filter-repo --analyze Then the large files can be removed from git history using git filter-repo as follows: git filter-repo --strip-blobs-bigger-than 10M This removes all files larger than 10MB from .git/objects/ directory. You may have to use --force argument, if the repository is not a fresh clone. The command will also remove the origin remote, so you will need to readd it!...

 May 15, 2025  •   1 min  •   189 words  •   Suyog Garg

How to use Git With Dropbox?

Problems I have encountered using Dropbox: Dropbox storage space available for use is really low, and is consumed relatively easily because of the .git folder. Dropbox real time sync has issues with git if multiple computers work on a project simultaneously. Although, it has been rare that I have encountere this. My current solution for this problem is as follows: Move the most space consuming .git folders outside of Dropbox. This way Dropbox won’t be syncing these large folders....

 April 2, 2025  •   2 min  •   413 words  •   Suyog Garg

git submodules are erroneous

In the name of sheer simplicity, it would be advised to best not use the git submodule utility ! If there is the utmost need to have one directory within the other, then try to have only git repository among them, yeah. Or else, try to separate out the repositories into separate folders, yah ! It may happen that you may not be able to see new changes in the main directory after using submodule for a while....

 May 2, 2024  •   1 min  •   127 words  •   Suyog Garg

Do not ask for Git passphrase on each commit

So that we don’t have to write the passphrase each time we do git commit ! Add this to the bash file : env=~/.ssh/agent.env agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; } agent_start () { (umask 077; ssh-agent >| "$env") . "$env" >| /dev/null ; } agent_load_env # agent_run_state: 0=agent running w/ key; 1=agent w/o key; 2= agent not running agent_run_state=$(ssh-add -l >| /dev/null 2>&1; echo $?...

 March 28, 2024  •   1 min  •   101 words  •   Suyog Garg

Customizing Mac Terminal

Update 2025/04/24 Changed to eza instead exa for alias for ls commands with icons, because the exa package is no longer supported. Thus, # map exa commands to normal ls commands alias ll="eza -l -g --icons" alias li="eza --icons" alias lt="eza --tree --icons -a -I '.git|__pycache__|.mypy_cache|.ipynb_checkpoints'" The full ~/.zshrc file now is: # If you come from bash you might have to change your $PATH. # export PATH=$HOME/bin:/usr/local/bin:$PATH # Path to your oh-my-zsh installation....

 February 3, 2023  •   8 min  •   1555 words  •   Suyog Garg