Getting Started with GitHub on VS Code: a Guide. A walk through on how to get started with GitHub and VSCode.
The main goal of this guide is to help you understand how to use Git and GitHub with VS Code (Visual Studio Code).
A walk through on how to get started with GitHub and VSCode.
Open VS Code.
Press Ctrl+Shift+P or F1 to open the command palette.
Type git clone and press enter.
Copy the GitHub repository URL by clicking the green Clone or download button on your repository page.
Paste the URL into the Git: Clone prompt in VS Code and press enter.
VS Code will confirm that you want to open the cloned repository, click Open Repository.
Right-click on a file in your repository and select Open Changes View. This will show you any changed files in the project.
Right-click any file with changes and select Stage File to stage it for commit. You can also stage all files at once using the Stage All Changes button at the top of the view.
This guide will walk you through setting up GitHub and Visual Studio Code to use Git and GitHub. This will be a quick run through of the basics but it is a great way to start using GitHub.
We are going to create a repository on your machine, add a file, stage it, commit the change, push it to the server and then create a pull request on GitHub. This tutorial uses GitBash but feel free to use another shell if you want.
This guide assumes you have already installed VSCode and GitBash on your machine. If you haven’t already installed them, I recommend downloading both of them here:
We are also assuming that you have a GitHub account for this exercise. If not, go sign up for one here: https://github.com/join?source=header-home
Create Your Repository
Step 1: Create A New Repository
Create a new repository on your local machine by opening up GitBash and navigating to the directory where you want your new repository created and then running this command:
One of the most common questions I get asked is how to get started with GitHub.
I’ve been using it for a long time but I decided to put my thoughts in a post for people who are just getting started with GitHub.
GitHub is a website that allows collaboration between developers using the Git version control system. You can find all sorts of open source projects that may spark your interest that you can get involved in, as well as libraries of code that you may find useful to your projects.
This is an introduction to using Git with the popular code editor Visual Studio Code. If you are new to using VSCode, I would recommend that you take a look at the introductory documentation first. This article will focus on getting up and running with Git and GitHub on your Windows machine with VSCode as your editor.
1. Install Git
You can download the latest version of Git here. Take note of the installation directory since it will be required later. I would also recommend selecting all of the defaults during installation (including adding Git as a PATH variable).
GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere. This tutorial teaches you GitHub essentials like repositories, branches, commits, and Pull Requests. You’ll create your own Hello World repository and learn GitHub’s Pull Request workflow, a popular way to create and review code.
No coding necessary
To complete this tutorial, you need a GitHub.com account and Internet access. You don’t need to know how to code, use the command line, or install Git (the version control software GitHub is built on).
Tip: Open this guide in a separate browser window (or tab) so you can see it while you complete the steps in the tutorial.
Whether you’re new to Git or a seasoned user, GitHub Desktop simplifies your development workflow. Download for macOS Download for Windows (64bit) Download for macOS or Windows (msi) Download for Windows. By downloading, you agree to the Open Source Applications Terms.
Introducing GitHub Desktop
GitHub Desktop allows developers to synchronize branches, clone repositories, and more. GitHub Desktop is your springboard for work. You’ll find all your projects and teams right on your desktop, ready for you to jump in and get to work.
Clone a repository
With GitHub Desktop, you can easily clone repositories from the app without needing to use the command line. Select File > Clone Repository from the main menu. You’ll see a list of repositories that you have access to on GitHub. Enter the URL of a repository that you want to clone and click Clone.
Create a branch
When you create a branch in your project, you’re creating an environment where you can try out new ideas. Changes made on a branch don’t affect the master branch, so you’re free to experiment and commit changes, safe in the knowledge that your branch won’t be merged until it’s ready to be reviewed by someone you’re collaborating with.
Select Branch from the