Some useful commands for Git.
git tag -a v1.0.0 -m 'v1.0.0'
git push origin --tags # To push tags to Github
git tag -d v1.0.0
git push origin :refs/tags/v1.0.0 # To remove the tag from Github
git push origin --delete <branch>
git branch --delete <branch>
git branch -d <branch> # Shorter version
git branch -D <branch> # Force delete un-merged branches
git branch --delete --remotes <remote>/<branch>
git branch -dr <remote>/<branch> # Shorter
git fetch <remote> --prune # Delete multiple obsolete tracking branches
git fetch <remote> -p # Shorter
Git LFS replaces large files such as audio files, datasets, .zip files, etc with text pointers inside Git, while storing the file contents on a remote server (e.g., github.com).
Easiest way to install on macOS is via Homebrew.
brew install git-lfs
If you haven't created a Git LFS account, you must first run the following command (you only need to run this once):
git lfs install
This command will create a .gitattributes
file instructing LFS to track .zip
files. Simply change the file extension as needed.
git lfs track "*.zip"
Make sure you add the .gitattributes
file to your repo.
git add .gitattributes
Now, anytime you add a file with an extension being tracked by LFS, it will work as it normally does while keeping your repo to a manageable size.