Skip to content

Instantly share code, notes, and snippets.

@MichaelCurrie
Last active March 14, 2018 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MichaelCurrie/09fac7b712a284aacbbfc9fac023f9ba to your computer and use it in GitHub Desktop.
Save MichaelCurrie/09fac7b712a284aacbbfc9fac023f9ba to your computer and use it in GitHub Desktop.
Set up Git LFS for a new repo
# Instructions for Windows developers working on the Fling Unity Visualization Tool
# 1. Install the latest version of Unity
# 2. (NOT NEEDED) Install "SmartMerge" for Unity by following https://docs.unity3d.com/Manual/SmartMerge.html
# 3. Install GitHub Desktop
# 4. Install git-lfs
# 5. Get a GitHub developer account
# 6. Get invitated and accept the invitation to the fling-asia GitHub organization
# 7. Clone the fling-unity repository to your computer via the GitHub desktop app
# 8. Open the program in Unity
# 9. Also install Visual Studio? (@MichaelCrurie didn't have to do this since he already had it on his computer)
#-------------
# To set up a NEW repository for an old Unity project:
# 1. Put all the unity stuff in a folder, say fling-unity/
# 2. Navigate to that folder.
# 3. Insert the below .gitignore and .gitattributes files to the root folder (fling-unity/)
# 4. Add a README.md to the root folder (fling-unity/)
# 5. Follow this:
git init .
git add .gitignore
git add .gitattributes
git add README.md
git commit -m "Initial commit"
# 6. In the GitHub desktop app, add this repository "from local"
# 7. In the GitHub desktop app, Publish the repo
git branch develop
git checkout develop
# 8. In the GitHub desktop app, Publish the branch
# 9. In the GitHub desktop app, stage all the files to commit, and then make the commit "Mass commit"
# 10. In the GitHub desktop app, Push to remote
## Unity ##
# from https://gist.github.com/nemotoo/b8a1c3a0f1225bb9231979f389fd4f3f #
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
*.physicsMaterial2D merge=unityyamlmerge eol=lf
*.physicsMaterial merge=unityyamlmerge eol=lf
*.asset merge=unityyamlmerge eol=lf
*.meta merge=unityyamlmerge eol=lf
*.controller merge=unityyamlmerge eol=lf
## git-lfs ##
#Image
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.psd filter=lfs diff=lfs merge=lfs -text
*.ai filter=lfs diff=lfs merge=lfs -text
#Audio
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text
*.ogg filter=lfs diff=lfs merge=lfs -text
#Video
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.mov filter=lfs diff=lfs merge=lfs -text
#3D Object
*.FBX filter=lfs diff=lfs merge=lfs -text
*.fbx filter=lfs diff=lfs merge=lfs -text
*.blend filter=lfs diff=lfs merge=lfs -text
*.obj filter=lfs diff=lfs merge=lfs -text
#ETC
*.a filter=lfs diff=lfs merge=lfs -text
*.exr filter=lfs diff=lfs merge=lfs -text
*.tga filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.dll filter=lfs diff=lfs merge=lfs -text
*.unitypackage filter=lfs diff=lfs merge=lfs -text
*.aif filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.rns filter=lfs diff=lfs merge=lfs -text
*.reason filter=lfs diff=lfs merge=lfs -text
*.lxo filter=lfs diff=lfs merge=lfs -text
# .gitignore for Unity
# (from https://github.com/github/gitignore/blob/master/Unity.gitignore)
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
[Bb]uilds/
Assets/AssetStoreTools*
# Visual Studio 2015 cache directory
/.vs/
# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
# Unity3D Generated File On Crash Reports
sysinfo.txt
# Builds
*.apk
*.unitypackage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment