Skip to content

Instantly share code, notes, and snippets.

@michel-zimmer
Last active July 25, 2016 10:12

Revisions

  1. Michel Zimmer created this gist Jul 25, 2016.
    5 changes: 5 additions & 0 deletions .getignore
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    #==Unity
    #==Global/MonoDevelop
    #==Global/Linux
    #==Global/OSX
    #==Global/Windows
    29 changes: 29 additions & 0 deletions .gitattributes
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    # Auto detect text files and perform LF normalization
    * text=auto

    # Higher probability of success rates while merging C# files
    *.cs diff=csharp

    # Git LFS
    *.assets filter=lfs diff=lfs merge=lfs -text
    *.bmp filter=lfs diff=lfs merge=lfs -text
    *.tiff filter=lfs diff=lfs merge=lfs -text
    *.tif filter=lfs diff=lfs merge=lfs -text
    *.tga filter=lfs diff=lfs merge=lfs -text
    *.jpg filter=lfs diff=lfs merge=lfs -text
    *.jpeg filter=lfs diff=lfs merge=lfs -text
    *.png filter=lfs diff=lfs merge=lfs -text
    *.psd filter=lfs diff=lfs merge=lfs -text
    *.tga filter=lfs diff=lfs merge=lfs -text
    *.mp3 filter=lfs diff=lfs merge=lfs -text
    *.ogg filter=lfs diff=lfs merge=lfs -text
    *.wav filter=lfs diff=lfs merge=lfs -text
    *.aiff filter=lfs diff=lfs merge=lfs -text
    *.aif filter=lfs diff=lfs merge=lfs -text
    *.mod filter=lfs diff=lfs merge=lfs -text
    *.it filter=lfs diff=lfs merge=lfs -text
    *.s3m filter=lfs diff=lfs merge=lfs -text
    *.xm filter=lfs diff=lfs merge=lfs -text
    *.mp4 filter=lfs diff=lfs merge=lfs -text
    *.mov filter=lfs diff=lfs merge=lfs -text
    *.ttf filter=lfs diff=lfs merge=lfs -text
    98 changes: 98 additions & 0 deletions .gitignore
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,98 @@
    ## https://raw.githubusercontent.com/github/gitignore/master/Unity.gitignore ##
    /[Ll]ibrary/
    /[Tt]emp/
    /[Oo]bj/
    /[Bb]uild/
    /[Bb]uilds/
    /Assets/AssetStoreTools*

    # Autogenerated VS/MD/Consulo solution and project files
    ExportedObj/
    .consulo/
    *.csproj
    *.unityproj
    *.sln
    *.suo
    *.tmp
    *.user
    *.userprefs
    *.pidb
    *.booproj
    *.svd


    # Unity3D generated meta files
    *.pidb.meta

    # Unity3D Generated File On Crash Reports
    sysinfo.txt

    # Builds
    *.apk
    *.unitypackage
    ## https://raw.githubusercontent.com/github/gitignore/master/Global/MonoDevelop.gitignore ##
    #User Specific
    *.userprefs
    *.usertasks

    #Mono Project Files
    *.pidb
    *.resources
    test-results/
    ## https://raw.githubusercontent.com/github/gitignore/master/Global/Linux.gitignore ##
    *~

    # temporary files which can be created if a process still has a handle open of a deleted file
    .fuse_hidden*

    # KDE directory preferences
    .directory

    # Linux trash folder which might appear on any partition or disk
    .Trash-*
    ## https://raw.githubusercontent.com/github/gitignore/master/Global/OSX.gitignore ##
    *.DS_Store
    .AppleDouble
    .LSOverride

    # Icon must end with two \r
    Icon


    # Thumbnails
    ._*

    # Files that might appear in the root of a volume
    .DocumentRevisions-V100
    .fseventsd
    .Spotlight-V100
    .TemporaryItems
    .Trashes
    .VolumeIcon.icns
    .com.apple.timemachine.donotpresent

    # Directories potentially created on remote AFP share
    .AppleDB
    .AppleDesktop
    Network Trash Folder
    Temporary Items
    .apdisk
    ## https://raw.githubusercontent.com/github/gitignore/master/Global/Windows.gitignore ##
    # Windows image file caches
    Thumbs.db
    ehthumbs.db

    # Folder config file
    Desktop.ini

    # Recycle Bin used on file shares
    $RECYCLE.BIN/

    # Windows Installer files
    *.cab
    *.msi
    *.msm
    *.msp

    # Windows shortcuts
    *.lnk
    58 changes: 58 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,58 @@
    # How to use GitHub to host Unity repositories

    Examples for `.getignore`, `.gitigore` and `.gitattributes` are atached.

    ## Unity

    From the main menu under `Edit`, `Project Settings` and then `Editor` set the `Version Control` `Mode` to `Visible Meta Files` and `Asset Serialization` `Mode` to `Force Text`.


    ## `.gitignore`

    Use the following templates from github.com/github/gitignore:

    - [Unity](https://github.com/github/gitignore/blob/master/Unity.gitignore)
    - [Global/MonoDevelop](https://github.com/github/gitignore/blob/master/Global/MonoDevelop.gitignore)

    If it is not assured, that every project member has its Git installation configured to ignore operating system specific files, you might want to include these:

    - [Global/Linux](https://github.com/github/gitignore/blob/master/Global/Linux.gitignore)
    - [Global/OSX](https://github.com/github/gitignore/blob/master/Global/OSX.gitignore)
    - [Global/Windows](https://github.com/github/gitignore/blob/master/Global/Windows.gitignore)


    ## `.gitattributes`

    Auto detect text files and perform LF normalization:
    `* text=auto`

    Higher probability of success rates while merging C# files:
    `*.cs text diff=csharp`


    ## Git LFS

    Use [Git Large File Storage](https://git-lfs.github.com/) and track the following files as a starting point:

    - `.assets`
    - `.bmp`
    - `.tiff`
    - `.tif`
    - `.tga`
    - `.jpg`
    - `.jpeg`
    - `.png`
    - `.psd`
    - `.tga`
    - `.mp3`
    - `.ogg`
    - `.wav`
    - `.aiff`
    - `.aif`
    - `.mod`
    - `.it`
    - `.s3m`
    - `.xm`
    - `.mp4`
    - `.mov`
    - `.ttf`