View staging area git disk space

I want the version to manage my home directory in git.

I used ncduto find the largest directories, and build from there .gitignore, which I hope, eliminate the biggest and the most useless part of my home directory (eg .gem/, .cache/, .cabal/, tmp/).

After execution git add $HOME, how can I view the index / cache / staging area regarding disk usage?

Ideally, I'm behind something interactive, for example ncdu, where I can deploy to subdirectories.

+4
source share
2 answers

The data warehouse in git-dir.

git .git(git -dir).

refs/stash; reflog (, stash @{0} - stash, stash @{1} - , stash@{2.hours.ago} ).

+1

, git ?":

"" , .

... make commit ( git reset @~ )

, "git :

git diff-tree -r -c -M -C --no-commit-id @     # get new blobs for HEAD commit
git cat-file --batch-check << blob ids         # get size of each blob

git cat-file bach , objectsize:disk.
, %(objectname) %(objecttype) %(objectsize).

0

Source: https://habr.com/ru/post/1662003/


All Articles