User Tools

Site Tools


tool:software:git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tool:software:git [2018/07/28 00:57] (current)
Line 1: Line 1:
 +====== Git ======
  
 +===== .gitignore =====
 +
 +The ''​.gitignore''​ file tells git which files you do not want included when you upload to your repository. For example fiels with personal info, or just things irrelevant to other people who may contribute.
 +
 +They can live multiple places, so you can exlude things globably, or per-project.
 +
 +==== Windows ====
 +
 +It's a little bit fiddly to make dot files on windows, but you can do so from the command prompt. Either:
 +
 +  * ''​NUL>​ .gitignore''​ to create a new file.
 +  * ''​REN [existing file] .gitignore''​ to rename a file you've already made.
 +
 +To open a command prompt at your current location in Windows Explorer enter ''​cmd''​ in the location bar and hit ''​Enter''​. You can jump there quickly with either ''​F4''​ or ''​Alt+D''​
 +
 +==== Examples ====
 +  * https://​git-scm.com/​docs/​gitignore (docs)
 +  * https://​github.com/​raysan5/​raylib/​blob/​master/​.gitignore
 +
 +<​file>​
 +# comment
 +*.ext
 +file/path/
 +directory/
 +[Cc]ase
 +</​file>​
 +
 +=== Specific useful things to ignore ===
 +
 +So for Unity game you probably want to ignore those .pdb files.
 +
 +  * https://​gist.github.com/​octocat/​9257657
 +
 +<​file>​
 +# Visual Studio / Unity
 +*.pdb
 +
 +# Temp files
 +*~
 +</​file>​
 +
 +If you want to, as a base, ignore everything, then specifically tell it what to not-ignore:
 +
 +  * https://​stackoverflow.com/​questions/​987142/​make-gitignore-ignore-everything-except-a-few-files#​987162
 +  * https://​stackoverflow.com/​questions/​22896230/​gitignore-everything-except-specific-files
 +
 +<​file>​
 +</​file>​
tool/software/git.txt · Last modified: 2018/07/28 00:57 (external edit)