简体   繁体   中英

Git in a total mess with Tower

On my personal project (A Rails app), I forgot to commit whilst working and continued working for many months since. I have changed quite a lot since the last commit and now I wish to get Git all back up and running and to use it properly but Tower is messing up due to it showing 55,000+ files in the Files to stage list. A lot of them seem to be files in directories that I don't want committed (like a node_modules directory) but those have since been deleted but they are still listed. Any action I try to take like stage or unstage or right click a file seems to take ages (as expected with this many I guess). I ahve tried adding certain things to my .gitignore file but they don;t seem to be having any effect.

I've learnt my lesson here and just want my git repo back up and running but need help getting it there.

Any suggestions?

Two possible solutions.

  1. clone git into a new directory and copy files that you want there and commit from second directory.
  2. Don't stage all files. Instead stage small amount of files you want and commit them. Then do another set of files, etc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM