How does gitignore work?

Viewed 13585

Hello I'm new to git and I can't fully understand the .gitignore.

So let's say I have a Master Folder currently in Production and inside it there's a reports folder that I don't really need to track.

Master Folder
 |
 +-- file 1
 |    
 +-- dir 2
 |  |  
 |  \-- file 2.1
 |    
 +-- dir 3
 |  |  
 |  +-- file 3.1
 |  \-- file 3.2
 |    
 +-- Reports
 |  |  
 |  +-- file 4.1
 |  \-- file 4.2

Now, I wanted to modify the folder so I clone the Master Folder in my repository. Does the reports folder gets cloned too?

While I'm editing, some person added or changed files inside the reports folder.

After I finish editing, I need to update the Master Folder to what I've updated. If I git push my changes, will it affect the Reports Folder in the Master Folder?

3 Answers
Related