From the solution explorer select your solution and pick Create Git Repository (requires the new Git Tools to be enabled):
Fill in the wizard that pops up:
And you have a reporitory. If you don't have a .gitignore
file yet, I'd pick "local repo", as using one of the other options will immediately commit & push. Then add the ignore file and exclude any items you don't wish to push before pushing to a git service:
You can do your renames before or after. Which would be a separate and unrelated question to how to initialize the git repo.
Renaming the project files can easily be done in the solution explorer. Renaming the folder containing each project is trickier. You need:
- Rename the project in Solution explorer
- Save all files ctrl+shift+s
- Remove the renamed project from your solution
- Rename the project folder in Windows Explorer.
- Use the Add existing project option in the solution explorer to add the project file in its new location:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…