You are not logged in.
Hi,
Suppose I got an application which creates and deletes a lot of files all the time (Zim Wiki is a good example). I cannot track the situation manually, neither do I want to. Is there a way to configure git so that while cloning the long deleted files and directories never downloaded?
Offline
Running 'git gc' does some basic garbage collection and compresses old objects. You can also clone with 'git clone --depth n' to truncate the cloned repository's history.
Offline
Running 'git gc' does some basic garbage collection and compresses old objects. You can also clone with 'git clone --depth n' to truncate the cloned repository's history.
--depth <depth>
Create a shallow clone with a history truncated to the specified number of revisions. A shallow repository has a number of limitations (you cannot clone or fetch from it, nor push from nor into it), but is adequate if you are only interested in the recent history of a large project with a long history, and would want to send in fixes as patches.
This doesn't look like what I want. I want a perfectly good clone looking exactly like the directory I last pushed from, without any workspace files deleted [by an external app] by the time of last commit.
I can't figure out how to use git gc. Experiments yielded nothing.
Last edited by Llama (2013-05-02 04:37:12)
Offline
Can you better explain what you are trying to achieve?
If your application creates and deletes a lot of files all the time these won't go into your git repository unless you manually add/delete them and push the changes. If you do push the changes, then next time you do a 'git clone' it will download all the history, including details of the deleted files. This is how git is designed to work. You can use "--depth 1" to only download the last commit, this will give you a working tree the same as the one you last pushed from but it won't download all the history of files that have been deleted previously.
But it sounds like you are after something more like rsync than git, if you're not interested in any history.
Offline
I'm sorry. Zim git plugin apparently takes care of it just right, leaving the push for me. Zim itself appears to litter the workspace a bit. Not much. No git issue at all. No issue at all, as a matter of fact.
Offline