PROBLEM
There many different .gitignore files into your project.
The “.gitignore” seams not working at all.
Your pull like commands comes with “ignored files”.
SOLUTION
- Create a .gitignore pattern.
- Fix your repository’s .gitignore file into master, at least.
Same to develop or another very used branch. - After updating or merging your local stuff, check the .gitignore content.
If the local .gitignore file is not like the pattern, just overwrite it with the pattern file.
If your project is too messy, simply overwrite local using the pattern as a “just after procedure”, to make sure. - Avoid having more than one .gitignore file.
Set just one under the project’s root dir.
In most of all usual cases, is enough.
.gitignore Example of a Java Project With Sonar and Docker files.
# Add any directories, files, or patterns you don't want to be tracked by version control # ECLIPSE'S **/target **/.settings **/.apt_generated **/.metadata *.classpath *.factorypath *.project *.class *.tern-project # PROJECT'S STUFF *.Jenkinsfile *.JenkinsfileTeste *.arquivoPdf.txt *.arquivoPng.txt *.arquivoXls.txt *.axis.log # TO BE USED TO LOG REPORTS AND MAINTENANCE *.log.out
#WHY .GITIGNORE SEEMS TO FAIL
Follow the figures below.
After fixing .gitignore file:
Another reason whe .gitignore fails is cause by a “conflicting state”.
Brazilian system analyst graduated by UNESA (University Estácio de Sá – Rio de Janeiro). Geek by heart.
Hi there! Would you mind if I share your blog with my twitter group? There’s a lot of people that I think would really enjoy your content. Please let me know. Cheers