✅ Cómo SUBIR un Proyecto Local a Github desde Visual Studio Code en menos de 6 minutos!

✅ Cómo SUBIR un Proyecto Local a Github desde Visual Studio Code en menos de 6 minutos!

How to Upload a Local Project to GitHub Using Visual Studio Code

Initial Setup and Installation

  • The video begins by acknowledging the existence of many tutorials on uploading projects to GitHub but aims to provide a straightforward method using Visual Studio Code.
  • It emphasizes the necessity of having both Visual Studio Code and Git installed on your operating system, recommending the installation of the system version rather than the user version.
  • After installing Visual Studio Code, users are instructed to check if Git is functioning by attempting to execute a command in the terminal; if unsuccessful, they need to download and install Git.

Creating a New Repository

  • Once both programs are installed, users can open their project folder in Visual Studio Code or create a new one for demonstration purposes.
  • The first command executed in the terminal is git init, which initializes a new local repository and creates a hidden .git directory within the project folder.
  • Following this, users run git add . to stage all new, modified, or deleted files for commit.

Configuring User Information

  • Users must configure their name and email address for commits using specific commands; this information will be included with each future commit.
  • After setting up user details, executing git commit -m "message" confirms that staged files are ready for upload.

Pushing Changes to Remote Repository

  • To upload changes to GitHub, users run git push, but an error may occur due to not defining a remote repository yet.
  • Users are guided through creating a remote repository on GitHub by clicking "Create New Repository," naming it, and choosing its visibility (public/private).

Linking Local Repository with Remote Repository

  • After creating the remote repository, users copy its link and use git remote add origin <link> in the terminal to link it with their local project.
  • The term "origin" serves as an alias for referencing the remote repository URL; however, any preferred name can be used instead.

Finalizing Push Command Configuration

  • On attempting another push with git push, an error may arise indicating that it's necessary first to set upstream tracking between local and remote branches using git branch --set-upstream-to origin master.
  • This step establishes explicit relationships between local and remote branches during initial pushes only.

Simplifying Future Commits

Video description

Cómo SUBIR un Proyecto Local a Github desde Visual Studio Code BIEN EXPLICADO y DETALLADO. GLOBAL SETUP (CONFIGURACION GLOBAL) git config --global user.email "email" git config --global user.name "name" INITIAL PROJECT SETUP (CONFIGURACIÓN INICIAL DE UN PROYECTO) git init git add . git commit -m "message" git remote add origin url git push --set-upstream origin branch PROJECT ALREADY SET UP (PROYECTO YA CONFIGURADO) git add . git commit -m "message" git push 🎁 GRACIAS POR TU APOYO 🤝 ⮞ https://mpago.la/2JNQ7F5 ⮞ https://cafecito.app/gabrielcoding ⮞ https://www.buymeacoffee.com/gabrielcoding 🚀UNITE A MI GRUPO DE TELEGRAM 🚀 https://t.me/gabrielcoding 🌐 MI WEB 🌐 ⮞ https://gabrielcoding.com 🔥 COMPRÁ LICENCIAS ORIGINALES AL MEJOR PRECIO 🔥 ⮞ https://gabrielcoding.com/comprar-programas-para-pc/ 📱 Seguime en mis REDES SOCIALES 📱 ⮞ https://instagram.com/gabrielcoding/ ⮞ https://www.tiktok.com/@gabrielcodingok ⮞ https://facebook.com/gabrielcodingok/ ⮞ https://x.com/gabrielcodingok/ ⮞ https://twitch.tv/gabrielcoding ⮞ https://kick.com/gabrielcoding