- What is VS Code
- Inital Step Flow
- Doing the Task Step Flow
- Download VS Code
- Installation Extension
- Install Git
- Setup GitHub Account
- Copy HTTPS Link
- Clone Repository
- Branch Repository
- Commit File
- Push to the Repository
- Compare and Pull Request
Visual Studio Code is a source-code editor made by Microsoft for Windows, Linux and macOS.Features include support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git. Users can change the theme, keyboard shortcuts, preferences, and install extensions that add additional functionality.
Step 1. Download VS Code
Step 2. Install Git ( If you have downloaded git / git command, then skip)
Step 3. Setup GitHub Account
Step 4. Copy HTTPS Link<
Step 5. Clone Repository
Step 6. Open Branch Repository
Step 7. Commit File
Step 8. Push to the Repository
Step 9. Compare and Pull Request
Step 1. Open Branch Repository
Step 2. Commit File
Step 3. Push to the Repository
Step 4. Compare and Pull Request
- Download VS Code
To install some library for VS Code
If you still do not download git command on your company, Please follow the below step.
-
Git for Linux
Step 1. Open a terminal:
sudo apt-get install git
Step 2. Verify the installation was successful by typing git --version:
apt-get install git
-
Git for Mac Installer
Step 1. Download the latest Git for Mac installer.
Step 2. Follow the prompts to install Git.
Step 3. Open a terminal and verify the installation was successful by typing git --version:
git --version
-
Git for Window Installer
Step 1. Download the latest Git for Git.
Step 2. Download 32 bits / 64 bits version .exe file
Step 3.1. Please tick the circled check box
Step 3.2, You can select any text editor you want in the dropdown menu below
Step 3.3. Select the custom options that you may want ot use
Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:
- Username
git config --global user.name "<Your username>"
git config --global user.email "<Your email>"
On GitHub, navigate to the main page of the repository.
Step 1. Above the list of files, click Code.
Step 2.To clone the repository using HTTPS, under "Clone with HTTPS", click the logo
Clone a repository from GitHub to your local computer to make it easier to fix merge conflicts, add or remove files, and push larger commits. When you clone a repository, you copy the repository from GitHub to your local machine.
Step 1.
-
For MacBook key shortcut:
Command + shift + P -
For Window shortcut:
Ctrl + shift + P
A branch is essentially is a unique set of code changes with a unique name. Each repository can have one or more branches.
Step 1. Click the left “network logo”
Step 2. Click the Branches
Step 3. Click the “+”
Step 4. Type the message ( Please follow the format )
Step 5. Click “Create Branch and Switch”!
Step 6. You will see the new branch in the branches
Git commit creates a commit, which is like a snapshot of your repository. These commits are snapshots of your entire repository at specific times. You should make new commits often, based around logical units of change. Over time, commits should tell a story of the history of your repository and how it came to be the way that it currently is. Commits include lots of metadata in addition to the contents and message, like the author, timestamp, and more.
Unstaged changes exist in your working directory, but Git hasn’t recorded them into its version history yet. You’ll usually want to stage them (mark them to become part of your next commit) or discard them by restoring the last committed version of the file.
Staged changes are a lot like unstaged changes, except that they’ve been marked to be committed the next time you run git commit. Upon your next commit, your staged changes become part of your Git history. git status will no longer list them as changes since they’re part of your last commit now.
Step 1. Click the left “network logo”
Step 2. Click the Source Control
Step 3. Click the “+” from Changes to Staged Changes
Step 4. Type the message ( Please follow the format )
Step 5. Click the logo
Pushing is how you transfer commits from your local repository to a remote repo. It's the counterpart to git fetch , but whereas fetching imports commits to local branches, pushing exports commits to remote branches.
Step 1. Click the Branches
Step 2. Click the “cloud logo “
Step 3. Choose your benches to publish to the repository
Create a pull request to propose and collaborate on changes to a repository. These changes are proposed in a branch, which ensures that the default branch only contains finished and approved work.
Step 1. Go to Github Repository
Step 2. Click “Compare & pull request”
Step 3. Code review and Click Assignees
Step 4. If ok , click the “create pull request”