Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

chore: remove lfs dependency #50

Merged
merged 3 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
*.md linguist-detectable

*.mp4 filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
Binary file modified assets/profile/mauss.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sites/dev.mauss/posts/fix-double-nat/cisco-port-forward.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sites/dev.mauss/posts/fix-double-nat/cisco-upnp.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sites/dev.mauss/posts/fix-double-nat/fully-accessible.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sites/dev.mauss/posts/fix-double-nat/huawei-port-forward.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sites/dev.mauss/posts/fix-double-nat/huawei-upnp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sites/dev.mauss/posts/fix-double-nat/plex-retry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sites/dev.mauss/posts/fix-double-nat/thumbnail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sites/dev.mauss/posts/fix-double-nat/tracert.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions sites/dev.mauss/posts/git-lfs-crash-course/+article.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
date: "2023-11-30T12:00:00+07:00"
title: Git LFS Crash Course
description: A quick introduction to the basics of Git LFS
tags: [tech, git, crash-course]
---

[Git LFS](https://git-lfs.com/) is an open source Git extension for versioning large files (e.g. audio, video, and graphics) with Git by replacing these large files with text pointers that are tracked by Git, while storing the file contents on a remote server like GitHub.

This extension is really useful when working on a project with large files that are updated frequently, such as assets in a game project. It allows us to keep the repository size small while still being able to version the large files, meaning faster cloning and pulling of the repository. We also don't need to worry about cleaning up the repository history to remove the large files after they are no longer needed.

We do have to keep in mind that Git LFS needs a remote server to store the large files, so we're fully dependent on the server for their availability, storage, and bandwidth. If you rarely or never update the large files, then you can ignore this extension knowing you're not missing out on anything.

## Installation

To install Git LFS, we can run the following command...

```bash
git lfs install
```

Then we can track the large files (we're using "mp4" files as an example here) by running...

```bash
git lfs track "*.mp4"
```

This will add or generate a `.gitattributes` file that you'll need to track and commit. Commit the rest of the changes, push it, and you're done!

## Uninstalling

To uninstall Git LFS, we can run the following command...

```bash
git lfs uninstall
```

Then go to your `.gitattributes` file and remove the lines that were added by Git LFS (if it's everything, then you can safely delete the file)

```diff
#$ file: .gitattributes
# examples this file might have
*.md linguist-detectable

-*.mp4 filter=lfs diff=lfs merge=lfs -text
-*.png filter=lfs diff=lfs merge=lfs -text
-*.jpg filter=lfs diff=lfs merge=lfs -text
-*.jpeg filter=lfs diff=lfs merge=lfs -text
```

Re-track and add the files that were previously tracked by Git LFS by running...

```bash
git add --renormalize .
```

commit the changes, push it, and you're done!

---

Reference(s):

- <https://git-lfs.com/> - Git Large File Storage Website
- <https://docs.github.com/en/repositories/working-with-files/managing-large-files> - Managing large files in GitHub
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sites/dev.mauss/posts/importance-of-proper-git-usage/thumbnail.png
Binary file modified sites/dev.mauss/posts/tdd-a-double-edged-sword/thumbnail.png
Binary file modified sites/dev.mauss/reviews/anime/k-on/yui-wants-to-do-the-vocals.mp4
Binary file not shown.
Binary file not shown.