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

  • Home
  • SEARCH
  • 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 3635124
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:51:52+00:00 2026-05-19T00:51:52+00:00

What is the exact the procedure you have to follow using git? I will

  • 0

What is the exact the procedure you have to follow using git? I will give my procedure (which is, somehow, not working very smoothly):

- cloned a repository: (works fine)
- added settings files to .gitignore to prevent overwriting the originial 
    settingfiles on the remote (= test environment)
- made changes to my local repository and committed it locally (works fine)
- pushed it from local to remote (did not work properly)

When pushing to the remote the settingfiles on the remote are deleted, which caused my test envirnment to die. I just want the settings files to be ignored if I push and not deleted.

What did I do wrong/forget? Any ideas?

  • 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-19T00:51:53+00:00Added an answer on May 19, 2026 at 12:51 am

    from what i understand, the settingsfile was already tracked in the git repo that you cloned. this means that even if you add it to .gitignore, it will still be tracked.

    to remove the file from the history, and make sure it’s ignored in the future you should

    • add it to the .gitignore (as you already did)
    • run git filter-branch --index-filter 'git rm --cached --ignore-unmatch settingsfile' HEAD

    note that you need to run the above command for each of the branches where the file is present.

    then you need to git push -f origin master (if master is the name of the branch, and origin the name of the remote)

    you can refer to this guide for additional info.

    Also, as Rafid K. Abdullah said, you haven’t deleted anything (if you have followed the workflow you describe in your post); you have just added modifications that you can easily revert. that’s what git is for after all 🙂

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

Sidebar

Related Questions

I have the following stored procedure that I working on. I have noticed that
Using SQl Server 2000 I have a stored procedure that joins 2 tables and
I have to write one Stored Procedure, In which I have to find the
Exact Duplicate of: Getting the size (free,total) of a Windows Mobile phone drive using
The exact error is as follows Could not load file or assembly 'Microsoft.SqlServer.Replication, Version=9.0.242.0,
Ok Here is the exact scenario: I have a view named Index I have
I have written a stored procedure that, yesterday, typically completed in under a second.
I have a zipped file, which i want to extract the contents of it.
I have a grid (DevExpress XtraGrid, if that matters) which is bound to a
Unfortunately I don't have a lot of technical information to give you but I

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.