1. What is the difference between git and github?
Git is an open-source, version control tool created in 2005 by developers working on the Linux operating system; GitHub is a company founded in 2008 that makes tools which integrate with git.
2. What is the staging area?
The staging area is like a rough draft space, it’s where you can git add the version of a file or multiple files that you want to save in your next commit (in other words in the next version of your project).
3. What does the -m switch do in git commit?
This allows you to attach a message to the commit.
4. What is the difference between merging and rebasing?
Merging is a safe option that preserves the entire history of your repository, while rebasing creates a linear history by moving your feature branch onto the tip of master.
5. What does git clone do?
git clone is primarily used to point to an existing repo and make a clone or copy of that repo at in a new directory, at another location.
6. What is forking?
A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project. Most commonly, forks are used to either propose changes to someone else’s project or to use someone else’s project as a starting point for your own idea.
7. How can we host a website on GitHub Pages?
- Head over to GitHub and create a new repository named username .github.io, where username is your username (or organization name) on GitHub.
- Go to the folder where you want to store your project, and clone the new repository.
- Enter the project folder and add an index.html file.
- Add, commit, and push your changes.
- Fire up a browser and go to https:// username .github.io .