Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6054771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:11:25+00:00 2026-05-23T08:11:25+00:00

Somehow I accidentally committed a .sln.docstates file. Now I added it to the gitignore,

  • 0

Somehow I accidentally committed a .sln.docstates file. Now I added it to the gitignore, however it won’t be ignored. I think this is because I already committed it once. Don’t know when!

Is there a possibility to make this gitignore rule working?
How can I delete it from my repository?

*.sln.docstates

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:11:26+00:00Added an answer on May 23, 2026 at 8:11 am

    It depends on whether you have pushed the repository changes or the changes are local.

    If you already pushed the changes to the remote repository then you are not supposed to rewrite history.

    If your changes are only local you use git log .sln.docstates to find out the history of the files and locate the commit where you added the file. The removal of the file from commits requires some git filter-branch magic, see a corresponding answer.

    The situation is simpler if the file is only present in the most recent unpublished commit: you can use git rm --cached .sln.docstates and git commit --amend. (The --cached switch tells git to don’t touch your files and remove it from the index only, and then you modify your last commit instead of creating a new using the --amend switch.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Somehow, at some point, I accidentally created a file in my home directory named
Somehow, I cannot get this piece of Smarty code to work as required: {assign
Somehow my index.php file at the server get modified. As a result, when I
I accidentally managed to lose the old version of our data model, and now
Does anyone else have this problem or is my Delphi cursed somehow? I'll have
Somehow today when I input: try {} catch {} I get this: try {
Somehow I need to make a custom file-open form. I manage to retrieve the
I didn't know what I did in eclipse . I think I accidentally pressed
Somehow when I compile this in VS 2008 it doesn't raise an error, is
Somehow images got saved as text/ascii and I need to recursively do this for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.