Jump to content

Git: Difference between revisions

305 bytes removed ,  1 February 2021
Line 94: Line 94:
Or you can create a custom .gitignore file at [https://www.gitignore.io gitignore.io].
Or you can create a custom .gitignore file at [https://www.gitignore.io gitignore.io].


==gitattributes==
==<code>.gitattributes</code>==
.gitattributes are used to give attributes to paths.<br>
.gitattributes are used to give attributes to paths.<br>
They can be used to assign programming languages to filenames.<br>
They can be used to assign programming languages to filenames.<br>
They are also used to identify which files should be stored in the lfs.<br>
They are also used to identify which files should be stored in the lfs.<br>
Here is an example to store video and images in the lfs.<br>
[https://gitlab.davidl.me/-/snippets/1/raw/master/lfs.gitattributes Here] is an example to store video and images in the lfs.<br>
<pre>
## Video
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.mov filter=lfs diff=lfs merge=lfs -text
*.flv filter=lfs diff=lfs merge=lfs -text
 
## Pictures
*.png filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
 
## Binary files
*.bin filter=lfs diff=lfs merge=lfs -text
*.7z filter=lfs diff=lfs merge=lfs -text
</pre>


==Clean==
==Clean==