Just to be clear, are you trying to move from TFS 2010 to TFS 2012 on premise or TFS 2010 to Visual Studio Team Services (TFS in the Cloud)?
If you are looking to move from TFS 2010 to TFS 2012, the easiest and highest fidelity way of doing this (i.e. retaining all your histories etc) is to upgrade the actual Project Collection database.
The steps to do this are documented here: https://www.visualstudio.com/en-us/docs/setup-admin/tfs/admin/move-project-collection
If you detach the collection from 2010, backup and restore it (using SQL Server) to the new instance, you can attach it on 2012 and it will commence the servicing steps to upgrade as needed.
There is another StackOverflow question that is relevant if this is the case too: Migration from TFS 2010 to TFS 2012
However, if you are looking to migrate to VSTS, things are much more complicated and you will need to upgrade to TFS 2017 RTM at a minimum (https://www.visualstudio.com/en-us/articles/adopting-vsts).