Git mistakenly delete uploaded files, folders

  Recently the company will before all items are switched from SVN to the Git, because it involves modifications to some of the branches, so the beginning encountered a particularly large number of problems, simply record it.

  1. careless colleagues .idea under the IDEA file folder and target folder are uploaded up, target folder Fortunately, the local and the remote can be deleted at the same time, but only want to .idea folder is deleted on the remote database, so Baidu some methods.

  Because we have .gitignore file, as to why there is, also submitted, because after the first push replication ignore a file from another project to come.

  Specific solutions:

    1. Direct Right in the project folder, click Git Bash Here, enter the Git commands;  

    2.git rm -r --cached .

    3.git add .

    4.git commit -m "Edit Information"

    5.git push -u origin master

  So, folders are deleted;

 

Guess you like

Origin www.cnblogs.com/JillisRealM/p/11597893.html