-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit_lfs_setup.sh
More file actions
executable file
·36 lines (31 loc) · 931 Bytes
/
git_lfs_setup.sh
File metadata and controls
executable file
·36 lines (31 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Install git-lfs if not already installed
if ! command -v git-lfs &> /dev/null; then
echo "Git LFS not found. Installing..."
# For macOS with homebrew
if command -v brew &> /dev/null; then
brew install git-lfs
# For Ubuntu/Debian
elif command -v apt-get &> /dev/null; then
sudo apt-get install git-lfs
else
echo "Please install git-lfs manually: https://git-lfs.github.com/"
exit 1
fi
fi
# Initialize git-lfs
git lfs install
# Track large file types
git lfs track "*.h5"
git lfs track "*.h5ad"
git lfs track "*.parquet"
git lfs track "*.npz"
git lfs track "*.npy"
git lfs track "*.pt"
# Add .gitattributes to repository
git add .gitattributes
echo "Git LFS setup complete. Large files will now be tracked properly."
echo "Use regular git commands to add and commit your files:"
echo "git add ."
echo "git commit -m 'Your commit message'"
echo "git push"