‘m learning VR it seemed a good idea to finally learn Git properly. In the past, I’d used GitHub just to play around with git conceptually. I liked it, but couldn’t really justify a paid account for private repos.
Over the past few days I’ve learned a few important things to know when you’re first getting started with Git:
- I’d noticed on the Udacity VR slack channel other students mentioning an alternative service called GitLab. The key feature here is private repos as part of the free account. So if you’re like me and just use git for personal use/education, take a look at GitLab.
- You don’t have to know the command line to use Git. There are plenty of desktop Git clients, many of them free, for all your versioning needs.
- There’s a couple of files to add to your repo early on. .gitignore to exclude files and .gitattributes to list off file types to store in Git LFS. As I said it pays to do this early on in a repos life. The effects of these two files only apply from the time the files are added to the repo.
- If you’re looking for inspiration for what to put into .gitignore, consider searching for common uses for the types of work you’re doing. For example in my case, Unity 3D projects create plenty of files on load or at runtime. So a common .gitignore for unity 3d projects would look something like this:
# =============== # # Unity generated # # =============== # [Tt]emp/ [Oo]bj/ [Bb]uild /[Bb]uilds/ /[Ll]ibrary/ sysinfo.txt *.stackdump /Assets/AssetStoreTools* *.apk *.unitypackage # ===================================== # # Visual Studio / MonoDevelop generated # # ===================================== # [Ee]xported[Oo]bj/ .vs/ /*.userprefs /*.csproj /*.pidb *.pidb.meta /*.suo /*.sln* /*.user /*.unityproj /*.booproj .consulo/ /*.tmp /*.svd # ============ # # OS generated # # ============# .DS_Store* ._* .Spotlight-V100 .Trashes Icon? ehthumbs.db [Tt]humbs.db [Dd]esktop.ini Corridor/Library/ShaderCache/ Corridor/Library/metadata/