Adding multiple files to Source Code Control from IntelliJ IDEA

I recently started a new software project using IntelliJ IDEA, and after some experimentation, decided to add the project to Team Foundation Server (TFS) so I can make changes and have them under version control. I had no problem setting up the connection to our TFS Server via the “VCS” menu, and I could easily add and checkin a directory or a single file by right-clicking on it in the project explorer window, but could not figure out how to add all of my project files and directories at the same time. Adding them one by one to version control is tedious, time-consuming, and error prone. Plus, I knew there was a way. I just didn’t know what it was.

After a lot of wasted time trying, and then googling, then checking Stack Overflow and the JetBrains support site, I eventually gave up and contacted their support.

Five minutes later, I received the answer back from them. (In addition to spending too much time fighting Eclipse, that’s one more reason why I like them so much.)
Here’s the answer:

  1. Look at the very bottom of the IDE, and see if there is a tab labeled “Changes”. If not, go to View > Tool Windows > Changes.
  2. Look at the “Local” panel in the “Changes” window.
  3. Under the “Unversioned files” node, there will be a list of all files and directories that are not under version control.
  4. Right-click the “Unversioned Files” node, and select “Add to VCS” from the pop-up menu.
  5. Right-click again, and select “Commit Changes”. You should be done.

I hope this helps someone, and remember- Version Control is your friend.
Adrian Carr

Leave a Reply

Your email address will not be published. Required fields are marked *