Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.gitignore still including asp.net core wwwroot/lib directory

Tags:

Before I even create my ASP.NET Core project I first create my git repository and select the initial gitignore template to be VisualStudio. I then added the line:

wwwroot/lib/

After committing and publishing this change I then created my ASP.NET Core Web Application project using the standard Web Application template to start with, and it still shows the brought in jquery and bootstrap files pulled down by bower as modified files ready to be committed? Is there a step I am missing here to prevent these as showing up as modified?

like image 223
Ben Krueger Avatar asked May 28 '17 03:05

Ben Krueger


People also ask

What is the lib folder in wwwroot?

New in ASP.NET Core projects is the existence of the wwwroot/lib folder, which holds collections of static files (CSS, JS, images) from front-end packages.

Where should .gitignore be placed?

A . gitignore file is a plain text file where each line contains a pattern for files/directories to ignore. Generally, this is placed in the root folder of the repository, and that's what I recommend. However, you can put it in any folder in the repository and you can also have multiple .

Should I include Gitignore in repo?

You should not use . gitignore files within the repository to ignore files that only appear for you, such as editor-specific swap files. You should be placing those rules in a global . gitignore file so that they apply to all repositories, or in .

Where do I put gitignore in local repository?

Local.gitignore A local.gitignore file is usually placed in the repository’s root directory. However, you can create multiple.gitignore files in different subdirectories in your repository. The patterns in the.gitignore files are matched relative to the directory where the file resides.

What is wwwroot folder in ASP NET Core?

What is wwwroot folder in ASP.NET Core? By default, the wwwroot folder in the ASP.NET Core application is treated as the webroot folder and this folder or directory should be present in the root project folder.

Is **/wwwroot/lib a gitignore entry?

Upon some more research, **/wwwroot/lib works as a .gitignore entry. Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Provide details and share your research! But avoid …

How do I list all Ignored files in a git repository?

The git status command with the --ignored option displays a list of all ignored files: The .gitignore file allows you to exclude files from being checked into the repository. The file contains globbing patterns that describe which files and directories should be ignored.


1 Answers

Upon some more research, **/wwwroot/lib works as a .gitignore entry.

like image 136
Ben Krueger Avatar answered Sep 18 '22 19:09

Ben Krueger