Jenkins

How To Refresh/Update .gitignore File

In this article, we will learn how to refresh or update .gitignore file.

A .gitignore file specifies intentionally untracked files that Git should ignore.
Git starts tracking files and respecting the patterns set in the .gitignore file after you run the git add . command.

The problem is that when we make some changes to the .gitignore file and then just run the git add . command again, the changes made in the .gitignore file will not take effect because the git cache needs to be cleared.

 

Steps to clear git cache and refresh or update .gitignore file:

  1. Make changes in .gitignore file
  2. Right click your project and then click Git Bash Here to open Git command line

    Git Bash Here

  3. Run git rm -r –cached . command  to clear Git cache
  4. Run git add . command to add all the files (with changes) in a repository to the staging area
  5. git commit your changes or continue working

 

Your git cache is cleared and .gitignore file is updated. Please give your valuable feedback and if you have any questions or issues about this article, please let me know.

Also, check Display ‘st’, ‘nd’, ‘rd’ And ‘th’ Suffix After Day Numbers With Dates In C#

Yasin Panwala

Yasin Panwala is a Web Developer and Author at TheCodeHubs. He has experience in Web Developing and Designing and also in Writing. He has got his skills in working on technologies like .NET Core, ADO.NET, AJAX, Angular, AngularJS, ASP.NET, ASP.NET MVC, Bootstrap, C#, CSS, Entity Framework, Express.js, GraphQL, HTML, JavaScript, JQuery, JSON, LINQ, Microsoft Office, MongoDB, MySQL, Node.js, PostgreSQL, SQL, SQL Server, TypeORM, TypeScript, Visual Basic .NET, Web API. He also got his skills in working with different integration and some known versioning tools. He is always ready to learn new things and he always tries his best on tasks that are assigned to him and gives the best possible outputs.

Recent Posts

Testing hk

Testing

2 years ago

Create and Used PIPE in angular

In this article, we have to show Create and Used PIPE in angular

2 years ago

Operation

Testing

2 years ago

Create and Used PIPE in angular

In this article, we have to show Create and Used PIPE in angular

2 years ago

Create and Used PIPE in angular

In this article, we have to show Create and Used PIPE in angular

2 years ago

TETS NEW

test

3 years ago