I would like to add a tag to a file to easily download that file and not the entire branch.
How do I download a specific file in GIT?
I would like to add a tag to a file to easily download that file and not the entire branch.
How do I download a specific file in GIT?
I am not aware of any way to tag specific files in
git
.For the second question: How do I download a specific file in
git
?The following works only if you mean "download while in a
git
repository" (That's how I understand your question, if you mean with git without having the repository see Get a single file from a remote git repository or Not able to extract single file from remote git server )Where
tagged-commit
can be a lot of things, among others:For GitLab specifically, downloading a single file is now explicitly supported, since GitLab 11.2 (August 22nd, 2018), thank to Kia Mei Somabes .
See "Download individual repository files":
The way
git
works is by adding a tag to the entire tree at the state of the commit. There is no way to add a tag to a single file.Since you are using gitlab, you can just download the file in the right revision from the web interface.