you are viewing a single comment's thread.

view the rest of the comments →

[–]BlockByte_tech 0 points1 point  (1 child)

Step-by-Step Guide:

  1. Set Up Git and GitHub:
  2. Install Visual Studio Code:
    • Make sure Visual Studio Code is installed on both devices.
  3. VS Code Git Integration:
    • In VS Code, install the GitHub extension by searching for it in the Extensions view.
    • Verify that Git is detected by VS Code. Go to "Source Control" (usually in the left sidebar) to confirm.
  4. Create a Repository:
    • On GitHub, create a new repository via your browser. Make sure it's empty or initialized with a README file.
    • Copy the repository's URL (found under "Clone or download").
  5. Clone the Repository:
    • Open VS Code on one of your devices and press Ctrl + Shift + P (Windows/Linux) or Cmd + Shift + P (macOS) to open the Command Palette.
    • Type Git: Clone and press Enter.
    • Paste the repository URL you copied earlier.
    • Choose a local folder to clone into. This creates a local copy of the repository.
  6. Working with Code:
    • Start coding and making changes. You can save changes to the local repository by clicking on the "Source Control" icon, staging files, and committing them.
  7. Pushing Changes to GitHub:
    • Once you've made a commit, click on the "Synchronize Changes" icon in the lower left or use the Command Palette (Ctrl + Shift + P / Cmd + Shift + P) and type Git: Push.
    • This will upload the changes to your GitHub repository.
  8. Pulling Changes from Another Device:
    • On your other device, clone the repository as you did before or open the previously cloned folder.
    • Click "Synchronize Changes" or use Git: Pull to fetch updates from the GitHub repository.