Push-Location C:\NotBackedUp\GitHub
cmd /c mklink /J jeremy-jameson "C:\BackedUp\GitHub\jeremy-jameson"
cmd /c mklink /J technology-toolbox "C:\BackedUp\GitHub\technology-toolbox"
Pop-Location
Note:
I typically clone GitHub repos into C:\NotBackedUp\GitHub\{owner}.
Technology Toolbox backs up files in C:\BackedUp a number of times throughout the day. By storing GitHub repos that I frequently work on in this folder, I don't have to worry about losing a substantial amount of work (for example, if my local environment craters and I have not pushed my changes to GitHub).
Push-Location C:\Users\jjameson\source\repos
cmd /c mklink /D GitHub "C:\NotBackedUp\GitHub"
cmd /c mklink /D jeremy-jameson "C:\BackedUp\GitHub\jeremy-jameson"
cmd /c mklink /D technology-toolbox "C:\BackedUp\GitHub\technology-toolbox"
cmd /c mklink /D techtoolbox "C:\BackedUp\techtoolbox"
Pop-Location
Note:
While it may seem a little confusing to have links to folders stored in both C:\BackedUp\GitHub and C:\NotBackedUp\GitHub, I add them both so I can quickly navigate to various Git repos from the default location used in Visual Studio.
These links are created as directory symbolic links (as opposed to Directory Junctions) to redirect to the desired location when selecting the folder in Visual Studio. Consequently the links must be created with elevated privileges.