The commit is now pushed and live on GitHub, and you can see it there:Ĭlick the “2 commits” link to see all the commits on the main branch:Īnd you can click the commit message to see more details about the change: Now click “Push origin” to push the commit to GitHub. If you switch to the History tab in the sidebar, you’ll see the new commit shown, with the changes you did: After you push, you can’t (easily) undo a commit. Ok now see, you have 2 indications that tell you have a local commit.Ĭommits are local until you push them to GitHub. In this case, you’ll create a redesign branch. For example, you have a website and you want to work on a redesign, which will take some weeks. But think of them as versions of your code that can exist simultaneously. You can also add a description for a longer, more detailed explanation of the changes:
For example, I wrote “Changed test to testing”. This should be describing your change in a few words. Then we’ll push the commit to GitHub, the centralized location that hosts our repository.Ĭhange the file in VS Code, for example changing the text “test” to “testing” in the index.html file: We’re going to change the file locally, on our computer, and we’ll create a new commit. Now you can use the application menu to open the repo in VS Code, too:
committed.Ĭlick that to see the commit you did on GitHub to create the index.html file: On the left sidebar, you have 2 panels: Changes and History.Ĭhanges list the changes you have in the repo, not committed. Here’s what you will get after the process is done: See, I set the “local path” to be /dev/testĬlick clone and the cloning process will start! I recommend you create a dev folder in your home directory, to keep all your coding stuff organized. It asks you where you want to clone the code. This means it will download the code and all the commits information. A new option shows up at the bottom, saying “Clone /test”Ĭlick that option, and GitHub Desktop will start cloning the repository on your computer. See? There we have the test repository we created in the last lesson.Ĭlick that. Accept this to set the username and email of Git, which you’ll need to create commits.
You will be redirected to GitHub to authorize the application to use the GitHub data:Ĭlick Accept when it asks you to open “GitHub Desktop”įinally, you’re ready to configure Git. Now install the GitHub Desktop app, and when it’s installed run it and you will see this screen.Ĭlick “Sign in to ”, the blue button. Previously I told you how to create an account on GitHub. This tool installs a graphical user interface to use Git, and also Git itself.Īfter installing it, open the application. □♂️ Note: Linux users can use this fork The simplest way to get started using Git and GitHub is by installing the GitHub Desktop application.Īvailable for Windows and Mac, you can download it from here: