Friday, July 17, 2020

Live your Website with GIT | GitHub

Nowadays software development takes place in a distributive way. This focuses on one such technology that supports distributed software development i.e GIT. According to the latest Stack Overflow developer survey, more than 70 percent of developers use Git, making it the most-used VCS in the world. Git is commonly used for both open source and commercial software development, with significant benefits for individuals, teams and businesses.
Popular companies that use Git and GitHub for source code hosting:
  • Netflix
  • Amazon
  • Airbnb
  • Google
  • IBM
What is GIT?
Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
  • Git relies on the basis of distributed development of a software where more than one developer may have access to the source code of a specific application and can modify changes to it which may be seen by other developers.
  • Initially designed and developed by Linus Torvalds for Linux kernel development in 2005.
  • Every git working directory is a full-fledged repository with complete history and full version tracking capabilities, independent of network access or a central server.
  • Git allows a team of people to work together, all using the same files. And it helps the team cope up with the confusion that tends to happen when multiple people are editing the same files.

What is GitHub?
GitHub, developed in 2008, is a web application that hosts Git repositories. The team that started GitHub saw that Git could solve important problems for many teams – but Git itself is often difficult to use. GitHub adds a bunch of collaboration and exploration tools on top of Git to help you (and your team) be more productive.
For instance, GitHub makes it easy to share code between multiple computers and developers. It's become the centralized organization tool of the open-source community and, in turn, is used by thousands of companies and teams. Some GitHub users have one repo they work with every day, some have hundreds.
Some of the most important tools GitHub layers on top of Git include:
  • Pull Requests which are a way for developers to propose changes and solicit feedback/discussion from other developers (called Code Review).
  • Issues which developers use to track bugs, enhancements, or other requests that are associated with a given repository. 
Git | GitHub in Visual Studio Code and Live your First Website
In this, you will learn how to clone an existing Git repository from GitHub. We will use the Visual Studio Code, but the same processes apply for using any Git-compatible client with GitHub. 

Step-1:  Download the Software and install it.

Step-2:  Create a Github account
Goto www.github.com and sign into your account. If you’re a new user, you can simply sign-up. You’ll have a username from here. Let us say that it’s your_username



Step-3: CONFIGURING GIT
Go to the Git Bash terminal and type this to configure git
git config --global user.name “your_username”
Now type command to link your email too.
git config --global user.email “your_emailid”


Step-4: Create a Github Repository
Go to your github account and create a repository with a name( lets say name of your project). We are creating a repository with the name Fullstack-1_2020


 Step-5: Clone a Repository
Copy the repo URL to your clipboard, in this example, https://github.com/pankkap/Fullstack-1_2020.git


Step-6: Open a new VS Code window.
Press Ctrl+Shift+P to show the Command Palette. The Command Palette provides an easy and convenient way to access a wide variety of tasks, including those provided by 3rd party extensions.
Execute the Git: Clone command. It may help to type “Git” to bring it to the shortlist.

                                                  
Step-7: Paste in the URL to your repo and press Enter.


Step-8: Location for repository

Select a location to save the repo



Step-9: Repository cloned in VS Code
Now open VSCode editor and find this will link to the Github Repository.
Step-10: Create an HTML file.
Now create an html file as index.html. The shortcut for creating basic html Skelton is
!+Tab (Creating basic html structur)

Step-11: Saving work with commits
Select the Source Control tab to see the one change to the solution.

Step-12: Commit the changes
Enter a commit message of “First commit” and press Ctrl+Enter to commit it locally.

Step-13: Synchronize Changes 
Click the Synchronize Changes button to synchronize your changes with the server. Confirm the sync if prompted.
Step-14: Provide Github Creational
If prompted, log in to your GitHub account.
Step-15: Reviewing commits
Switch to the GitHub browser tab. You can review the latest commits (changes) on GitHub repository. 
Step-16: live your website
In order to make your website live. Go to the setting and perform the following steps.

Step-17: Create GitHub Page Link
In Github Pages, select source from none to master branch.

Step-18: Refresh the Github Page
After refreshing GitHub page, your website link will be available there.


Step-19: Redirect to your website
Now Click the link and your website will be opened in the browser.