I am experimenting some linux configuration and I want to track my changes? Of course I don't want to to put my whole OS under version control?
Is there a way (with git, mercurial or any VCS) to track the change without storing the whole OS?
This is what I imagine:
Possible? Impossible? Work-arounds?
EDIT: What I care about is just to minimize the size of the repository and to have a repository containing only my changes. Having all files in my repository is not relevant for me. For example if i push to github I just want it to contain only the files that has changed.
Take a look at etckeeper, it will probably do the job.
What you want is git update-index --info-only
or ... --index-info
, from the man page: " --info-only is used to register files without placing them in the object database. This is useful for status-only repositories.". --index-info
is its industrial-scale cousin.
Do that with the files you want to track, write-tree
to write the index structure into the object db, commit-tree
that, and update-ref
to update a branch.
To get the object name use git hash-object
filename
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With