Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Page History: Placing Local Code Under Git Source Control

Compare Page Revisions



« Older Revision - Back to Page History - Current Revision


Page Revision: Thu, Jul 14, 2022, 8:18 AM


Manually

  1. Create repo on GitHub
  2. File Explorer: Navigate to source code root folder
  3. Rename folder
  4. Create new folder with old name
  5. Open a Command Window
  6. Navigate to NEW source code root folder, then up one level
  7. Command: git clone repo-url
  8. Move files from original folder into new folder
  9. Add a .GITIGNORE file - GitIgnore Files
  10. git add .
  11. git commit -m "Initial commit"
  12. git push

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 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.