Push/Sync doesn't show updates in CODE

I am using GitHub with Visual Studio on my personal Laptop and work Laptop. I created a simple change on one laptop, committed locally, then SYNC. On the next laptop did a sync and the code from the first laptop showed up but when I go into the GitHub portal under the code tab the small test code change isn’t there and the date is not updated.

I am struggling to understand the basic workflow of how to use GitHub. I am using a single GitHub account between both laptops.

I do not have any additional branches, just the root “main”.

Any ideas?

Hi Roger,

The workflow is simple:

  • do some change to your code and save
  • add into the stage area => on your integrated vscode terminal you can type git add --all or if you want to use a gui on vscode the third tab do the job:

    if you click on the + symbol you tell git the file you want to save on the history of the project.
  • then commit this changes to confirm the change you have stage => if you are using a terminal you can run git commit -m 'your message' or if you are using the gui on vscode the message is the first text block of the tab:

    Remember that a message in the commit is mandatory. Once you have write the message just click on the check symbols above.
  • at last push the change to github => even for this you could use the terminal command git push origin main or the gui in vscode. In this case the button you need to click is at the bottom of the page:
    Click the button next to the branch name main and you could see the code uploaded to github if there’s no error.
  • in the other pc you need to update the repository and you can do it by simply run the pull command git pull origin main or if you use the vscode gui just click the same button you click for the push.

This is it, hope this help :blush:

If I can advise I would like to propose you to do the official course that you could find in https://lab.github.com/ or if you are a book reader like me you can find this one very interesting Git - Book to start using git like a jedi.

Let me if this solves your problem :relaxed:

This was helpful, thank you. I also found an issue in my 10-year old solution that was giving me grief for one of my projects as it relates to GitHub.

All is good now.