Answer the question
In order to leave comments, you need to log in
How to clean up a git repository?
Hello everyone and thank you in advance for your replies! I started to study git and have not yet found information for myself that will answer my question. I made a repository on gitlab and pushed the project there (git push), but before that I did not make a .gitignore file, now I thought of making it, but adding a line there so that it ignores *.DS_Store
1. It does not ignore it
2. How delete this file in the repository so that later it does not swear that there are different versions on the computer and in the repository on gitlab?
Answer the question
In order to leave comments, you need to log in
Here are some facts to help you understand how Git works. You can write in a notebook.
--cached
will allow you to leave the file in the working directory if you need it.git rm --cached -- '.DS_Store'
git commit
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question