- What is the difference between git and github?
Git is a version control system, it allows developers to keep track of their code’s history at any given point in time, by creating git repositories on each project. On the other hand, GitHub is cloub-based hosting service that allows developers to manage, organize and present all their repositories, it also permits collaboration and sharing on source code as part of a documentation.
- What is the staging area?
The staging area is where GIT first starts tracking a given change, this is the stage that comes before actually commiting the change to the repository.
- What does the -m switch do in git commit?
It allows to attach a comment or a message to a commit, this should describe the changes that have been committed.
- What is the difference between merging and rebasing?
Merging will look for differences between the 2 branches and will create a new commit keeping the commit history intact, whilst rebasing will merge all changes to the main branch as a single patch, as a consequence of this, some of the commits might disappear as if they never existed.
- What does git clone do?
It creates a copy of a repository in another directory, this clone stays in synch with the original, therefore any changes applied to the clone will be reflected on the original and vice versa.
- What is forking?
Forking is the action of creating an exact copy of another repository but entirely disconnected from it, allowing the developer to experiment freely with the fork since it won’t have any repercussions on the forked repository.
- How can we host a website on GitHub Pages?
By creating a repository and adding github.io at the end of the repository name, and of course having and html file in that repository