Closed vcuspinera closed 11 months ago
When sharing your code with others, there are often files or parts of your project, you do not want to share.
Examples:
Git can specify which files or parts of your project should be ignored by Git using a .gitignore file.
.gitignore
Git will not track files and folders specified in .gitignore. However, the .gitignore file itself IS tracked by Git.
Create a .gitignore file in the root of your local Git.
Open the file using a text editor.
Add the rules you want to use. For example, you could add these two simple rules:
Ignore any files with the .log extension Ignore everything in any directory named temp
Now all .log files and anything in temp folders will be ignored by Git.
.log
temp
Se cierra issue tras concluir curso.
Explanation
When sharing your code with others, there are often files or parts of your project, you do not want to share.
Examples:
Git can specify which files or parts of your project should be ignored by Git using a
.gitignore
file.Git will not track files and folders specified in
.gitignore
. However, the.gitignore
file itself IS tracked by Git.Steps
Create a
.gitignore
file in the root of your local Git.Open the file using a text editor.
Add the rules you want to use. For example, you could add these two simple rules:
Now all
.log
files and anything intemp
folders will be ignored by Git.References