I try to use git exile. This is the sequence of actions that I usually take:
My expectation was that after this action, content of "huge" files will be copied to the drive and the original content of these files (in the local repository) will be replaced by a link to their location on the drive. However, for some reason I cannot verify it explicitly. I still have huge binary files in my repository (at least it is what I see with ls
or du
commands, or when I open the files with less).
Maybe my interpretation is wrong. Maybe the "links" exist only in the "staging area" and not in the "work-tree" / "file system".
What I basically want, is a switch between two states: (1) some files contain the original huge content, (2) file contain links to the huge content which is copied to the drive.
In other words, when I clone (or pull) the repository, I see "links" in some of the files (instead of the actual binary content). Then I replace these links by huge "binary content". Do the above described sequence of commands ("git add" + "git exile push" + "git commit") and, as a result, I still have the huge binaries in my working-tree. But now I want to push the local repository to the remote one and I do not want to push binary, I want to push new links. I pulled links and I want to push links. How can I achieve it?
To check the status, open the git bash, and run the status command on your desired directory. It will run as follows: $ git status.
You can see the list of all the commits you made (along with their commit messages) with git log . If you do git log -p , it will show you the full commit history, including the changes each commit made.
Link 1 : The documentation on the git-exile github might be interesting:
https://github.com/patstam/git-exile
Link 2 : Check out this post for the mechanism:
What is the difference between "git push" and "git exile push"?
To maybe clear up some of the questions you had:
The replacement actually happens at git add time
(See link 2)
When you use git exile push
:
When you add files to git, git-exile stores the real content in the .git/exile folder and uses the data there to silently replace references with the real file contents when needed.
when you push:
This will look for exiled files in the current directory and all subdirectories, and push the objects corresponding to the current version to the remote repository.
You seemed to have more than one question, maybe with reference to the overall logic/understanding of git exile. I would suggest to look at those 2 links for the mechanism :) However, I hope this helps a little!
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