I am having a dilemma right now regarding storing images:
I would like to check them in only if it comes to a point that the requests are very minimal. with this, I don't like my git repository to be cluttered with images since I have images that are in megabytes in size.
Currently, what I am doing is include almost everything except binaries, object files and images to my git repo.
Then every week, I do a full zip backup of everything.
What I would like to ask is, if there is a way to put files in git without versioning?
I know it defeats the purpose of git but the size of the git repo can be controlled with this way.
To illustrate:
pic1.jpg
. I would like to put it into git. pic1.jpg
with another image but with the same filename, it will just overwrite the pic1.jpg
and don't do version backups.This may sound dangerous, but from what I have learned from git is that if you committed a file into it, it will stay there forever.
There is another solution I think of: The project will be fully zipped and placed inside a dropbox and the developer who is new to the project will get it from the dropbox, extract, do a git fetch, then merge.
I hope someone could share their experience/expertise regarding this.
On GitHub.com, navigate to the main page of the repository. Above the list of files, using the Add file drop-down, click Upload files. Drag and drop the file or folder you'd like to upload to your repository onto the file tree.
You can't. If you give someone the push permission, he will be able to push whatever he want. If you want someone to have a partial access, you have many choices: Make him fork and pull-request the repository.
Should I Use Git LFS? You should use Git LFS if you have large files or binary files to store in Git repositories. That's because Git is decentralized. So, every developer has the full change history on their computer.
Rendering and diffing imagesGitHub can display several common image formats, including PNG, JPG, GIF, PSD, and SVG. In addition to simply displaying them, there are several ways to compare differences between versions of those image formats.
if there is a way to put files in git without versioning
The only one proposing that is git-annex
(not available on Windows)
I mention in "Git repository setup with binaries" another tool "bup", which actually store the data in a git-compatible repo.
But if you don't intent to go back often and rebuilt old version of your project, putting those resources (large pictures) in a git repo isn't very useful, and git-annex can help dealing with that state.
Beware of git repo through dropbox, it isn't always safe (see "Git with Dropbox Issues").
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