After adding the .gitignore file and submitting it, the files that were ignored for version control were re-added to version control.
淡淡烟草味
淡淡烟草味 2017-05-02 09:22:57
0
3
579

There are some configuration files on the remote warehouse that have been uploaded before. I want to remove their version control. Do not add these configuration files every time you commit or push. So first set these files to untrack, then create a .gitignore file, and add the file name to be ignored. The icon of the file in eclipse has changed. When committing, various delete: file names are prompted.
But regardless of whether it is commit or commit/push, all the files that were ignored just now have been added to version control (you can see it through the icon of the file in eclipse, you can also see it after modifying the file content and committing). I would like to ask what is going on? Why are the files that were originally removed from version control added to version control after the commit?

淡淡烟草味
淡淡烟草味

reply all(3)
我想大声告诉你

Suppose you have
a.txt, b.txt, c.txtthree files and they have all been submitted.

Now you wishignore b.txt

That should be doneb.txt加入到.gitignore文件中,echo "b.txt" >> .gitignore

Then this time commit/push, you will see

.gitignore
b.txt

If b.txtthere are changes this time, you will see it. It’s okay

Just carecommit/push,下次才会忽略所有b.txt and you will ignore all

changes next time.

I don’t know if you need to say this🎜
迷茫

This contains the results you want /q/1010000000430426

左手右手慢动作

The problem has been solved. The operation method is (in eclipse): first right-click the file to be removed from version control and ignore it. A record of the file will be added in .gitignore, then delete the file, then commit and push, so that the remote branch will be deleted. The file. Next time you regenerate the file locally, since it is added to .gitignore, the newly generated file will no longer be added to version control~
(ps: I have followed this idea before without success. , but the next day, I asked others for advice and they also said to do it this way, and then I went home and did it again and it was successful =.=)

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template