This content originally appeared on DEV Community and was authored by Bodhisha Thomas
Both .gitignore and .git/info/exclude are used to ignore files from staging in git.
.gitignore
- If a file should be ignored in all clones of the repository, you would use .gitignore
- This file needs to be committed and the files mentioned would be ignored in all the clones.
.git/info/exclude
- If for some reason you need to locally ignore certain files in a single clone, you would use .git/info/exclude
- This file acts as a .gitignore for your own local git folder and is not committed or shared with anyone else.
References
This content originally appeared on DEV Community and was authored by Bodhisha Thomas
Print
Share
Comment
Cite
Upload
Translate
Updates
There are no updates yet.
Click the Upload button above to add an update.
APA
MLA
Bodhisha Thomas | Sciencx (2021-08-05T07:29:40+00:00) When to use .gitignore and .git/info/exclude. Retrieved from https://www.scien.cx/2021/08/05/when-to-use-gitignore-and-git-info-exclude/
" » When to use .gitignore and .git/info/exclude." Bodhisha Thomas | Sciencx - Thursday August 5, 2021, https://www.scien.cx/2021/08/05/when-to-use-gitignore-and-git-info-exclude/
HARVARDBodhisha Thomas | Sciencx Thursday August 5, 2021 » When to use .gitignore and .git/info/exclude., viewed ,<https://www.scien.cx/2021/08/05/when-to-use-gitignore-and-git-info-exclude/>
VANCOUVERBodhisha Thomas | Sciencx - » When to use .gitignore and .git/info/exclude. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/05/when-to-use-gitignore-and-git-info-exclude/
CHICAGO" » When to use .gitignore and .git/info/exclude." Bodhisha Thomas | Sciencx - Accessed . https://www.scien.cx/2021/08/05/when-to-use-gitignore-and-git-info-exclude/
IEEE" » When to use .gitignore and .git/info/exclude." Bodhisha Thomas | Sciencx [Online]. Available: https://www.scien.cx/2021/08/05/when-to-use-gitignore-and-git-info-exclude/. [Accessed: ]
rf:citation » When to use .gitignore and .git/info/exclude | Bodhisha Thomas | Sciencx | https://www.scien.cx/2021/08/05/when-to-use-gitignore-and-git-info-exclude/ |
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.