Organize your files and folders, however, starting with your project and workflow, git doesn't care how the files are organized.
Since Visual Studio complains when I try to create a project in an existing folder, I follow these steps.
- Create an empty repository.
- Clone an empty repository locally.
- add
.gitignore etc. and make the initial commit.
- Create a VS project in a different folder.
- Then I do one of the following.
- copy the files from the .git repository to the VS solution folder, which changes the location of the local repo.
- close VS, copy the solution files to the local repository, and then open VS again.
I really need to spend time to automate it, but I spend more time working on existing projects than starting over again, so he has not been very annoyed so far.
I tried all visual git tools, including those that integrate with VS, but always end up using PowerShell instead - this is just a matter of preference. Try it, they can work well with your workflow.
source share