This content got low rating by people.

Git repository as server backup

Words
464
Reading
3 min
Listen
Play
5y

Git repository as server backup

Recently happened to a friend of mine. She had a gig on Fiverr for simple web development stuff, just some simple HTML, CSS e.t.c. One day she got a buyer request (idk what it's called on Fiverr) to help the move a local Git repo to GitHub, that's all of the information that came with the request.

It looked like a fairly simple task for a quick 10$ so she accepted it. After chatting a little with the client, it was revealed that the repo's size was over 15GBs! and that's why he was having trouble moving it. And the repo wasn't a project. The poor fella made a git repo in "/root/server-data". It had thousands of files, logs, system information, even some 3D models, for short it was a one-stop-shop.

The client wasn't aware of the 100MB limit of GitHub. After a bit of explaining to him that this task was literally impossible, the client told her to put all files over 5 MBs into .gitignore. So that's what she did. Now it was time to get rid of the previous commits that had the huge files. But there was only 1 single commit, just one.

She told him that she was gonna reset the repo since it only has one commit. The dude agreed. Little did she knew that this repo was the only copy of their server data. They had no backups, not even for a single file. So after a lovely "git reset --hard origin/main", they both were shocked.

She kept asking where the backups were to complete the job, but backups were not known to this fella (till now). The poor dude lost much of his precious data and my friend lost some stars on her profile.

I still can't figure out who is at fault here, the guy who created a repo inside a system directory, shoved 15 gigs of data in it, and made no backups, or the dumbass that straight-up ran that unholy git command## TLDR Summary:

She told him that she was gonna reset the repo since it only has one commit. The poor dude lost much of his precious data and my friend lost some stars on her profile. The poor fella made a git repo in "/root/server-data". Little did she knew that this repo was the only copy of their server data. She kept asking where the backups were to complete the job, but backups were not known to this fella (till now). After a bit of explaining to him that this task was literally impossible, the client told her to put all files over 5 MBs into .gitignore. After chatting a little with the client, it was revealed that the repo's size was over 15GBs!

Git repository as server backup | Ecency