简体   繁体   中英

Instead of showing some modified files, Git shows all files in Solution as Added/Modified

I am using Visual Studio for development. I am on my local branch and I was about to commit/push. In Git changes I had about 16 files which were modified. Now some reasons Git has listed all files in solution to Git Changes as File Added(New files). I ended up with 100+ files on my Git Changes. I only want to push my changes which are on 16 files I mentioned and The project runs just fine.

I am little bit lost on what to do. Please help!

The concept you are looking for is staging . Before you commit, you can stage specific files. Then once the commit is executed, only modifications to those specific files will be part of the commit. I suspect what happened in your scenario is that you didn't specify what files to stage before committing, so Visual Studio assumed you wanted to commit everything.

This is easiest done via the command line (instructions for this here ), otherwise follow these instructions to do this in Visual Studio.

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