Jasinski Technical Wiki


Home Page
All Pages

Quick Search
Advanced Search »

Contributor Links

Create a new Page
File Management
Your Profile

Other Wiki Sections



Placing Local Code Under Git Source Control

Modified on Thu, Jun 18, 2020, 4:20 PM by Administrator Categorized as Visual Studio and Developer Tools

With Visual Studio 2019

  1. Open project/solution in Visual Studio 2019
  2. File > Add to Source Control
  3. Team Explorer > Sync > Push > Publish To GitHub
  4. Be sure to select the owner user/organization!
  5. Be sure to select "Private Repository" checkbox as appropriate!

With Visual Studio 2017

  1. Open project in VS 2017
  2. Open solution/project folder in File Explorer
  3. Close project in VS 2017
  4. Rename folder
  5. Create new folder with original name
  6. Create repo in new empty folder: VS > Team Explorer > Connect page > Local Git Repositories > New
  7. (No need to update .GITIGNORE file - VS creates it correctly)
  8. Move code from renamed folder into new folder
  9. Delete old (now empty) folder
  10. Open repo: VS > Team Explorer > Connect page > Local Git Repositories > (double click new repo)
  11. Commit changes to repo
  12. Create remote repo on GitHub
  13. Push to remote repo: VS > Team Explorer > Sync page > Publish > specify GitHub repo URL

With SourceTree

  1. Add a .GITIGNORE file. (See this page - GitIgnore Files)
  2. Create a new Git Repository in the local folder
  3. Commit code to the local repository
  4. Create a new repository on GitHub
  5. Source Tree > Repository > Repository Settings > Add a new remote path (Remote name = "GitHub")
  6. Push local repository to GitHub

ScrewTurn Wiki version Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2021, Patrick Jasinski.