Ir al contenido principal

Github con Visual Studio Code

 

Setup Github on Visual Studio Code


I usually access github from within Visual Studio Code.  As such, when I start coding a new project, I often need a reminder, or a cheat sheet for how to connect Visual Studio Code to a Git repository.  These notes are more for me than for anyone else, but I'm sharing them nonetheless.

Steps:

  1. Create a directory on the local file system.
  2. Create a repo on Github.
  3. Select Clone "Clone or download" on Github, copy the link
  4. In Visual Studio Code, sect File -> Add Folder to Workspace -> Select the newly created directory
  5. Select Terminal Window
  6. In the window, type:
git config --global user.name <github userID>

git clone <URL from github link copied earlier>
 
That should be all that's required.  any newly created file should be available on github after stage/commit/push.

Git configuration variables can be stored at three different levels. Each level overrides values at the previous level.

1. System level (applied to every user on the system and all their repositories)
  • to view, git config --list --system (may need sudo)
  • to set, git config --system color.ui true
  • to edit system config file, git config --edit --system
2. Global level (values specific personally to you, the user).
  • to view, git config --list --global
  • to set, git config --global user.name xyz
  • to edit global config file, git config --edit --global
3. Repository level (specific to that single repository)
  • to view, git config --list --local
  • to set, git config --local core.ignorecase true (--local optional)
  • to edit repository config file, git config --edit --local (--local optional)

Para usar git desde el propio Visual Code

https://azuredevopslabs.com/labs/azuredevops/github/


Comentarios

Entradas populares de este blog

edX Certificado MITx

Servicio de validación de documentos:

Aprender rápidamente a desarrollar software

JavaScript for Beginners https://BeginnerJavaScript.com/friend... Javascript: The weird parts https://bit.ly/37lJ9in Advanced Javascript https://bit.ly/39vbIf8 Modern React with Redux https://bit.ly/2TBEDbI