TODO
Task 1
- Create documentation for a new language:
Create a new project
learn_language_name
examplelearn_go
in your user spaceAdd a new file README.md
Update file with information:
how to install language on WSL
how to run
hello world
how to declare data structures
how to user conditions and loops
what are the advantages compared with another language
Questions
What is the difference between git and GitHub?
Git is a version control system, GitHub is a hosting service for Git repositories.
Git is a hosting service for Git repositories, GitHub is a version control system.
Git is a version control system, GitHub is a version control system.
Git is a hosting service for Git repositories, GitHub is a hosting service for Git repositories.
What is the difference between
git pull
andgit fetch
?git pull fetches the latest commits and merges them into your current branch, while git fetch fetches the latest commits but does not merge them into your current branch.
git pull fetches the latest commits but does not merge them into your current branch, while git fetch fetches the latest commits and merges them into your current branch.
git pull fetches the latest commits and merges them into your current branch, while git fetch fetches the latest commits but does not merge them into your current branch.
git pull fetches the latest commits but does not merge them into your current branch, while git fetch fetches the latest commits and merges them into your current branch.
What command is used to download a repository from GitHub to your local machine?
git commit
git push
git fork
git clone
Which of the following commands will show you the history of commits in your repository?
git log
git commit
git status
git branch
How do you create a new branch and switch to it immediately?
git branch new-branch
git checkout new-branch
git checkout -b new-branch
git merge new-branch
What does the git status command do?
Displays the commit history
Lists all branches
Shows the status of changes as untracked, modified, or staged
Shows the current branch name
What is the purpose of .gitignore file?
To ignore files during the commit process
To list collaborators on the project
To specify the remote repository URL
To ignore files when pulling updates from remote
Answers
Answer: a
Explanation: Git is a version control system, GitHub is a hosting service for Git repositories. Git is a command-line tool, while GitHub is a web-based interface. Git is maintained by a community of developers, while GitHub is a company.
Answer: c
Explanation:
git pull
fetches the latest commits and merges them into your current branch, whilegit fetch
fetches the latest commits but does not merge them into your current branch.git pull
is a combination ofgit fetch
andgit merge
.Answer: d
Explanation:
git clone
is used to download a repository from GitHub to your local machine.git commit
is used to save your changes to the local repository,git push
is used to upload your changes to the remote repository, andgit fork
is used to create a copy of a repository on GitHub.Answer: a. git log
Explanation: git log is used to display the commit history of the current branch, showing a list of commits along with their details.
Answer: c. git checkout -b new-branch
Explanation:
git checkout -b new-branch
creates a new branch and switches to it immediately.git branch new-branch
creates a new branch but does not switch to it.git checkout new-branch
switches to an existing branch.git merge new-branch
merges a branch into the current branch.Answer: c. Shows the status of changes as untracked, modified, or staged
Explanation: git status provides information regarding the current branch, staged changes, and files that are not tracked by Git.
Answer: a. To ignore files during the commit process
Explanation: The .gitignore file is used to specify files that should be ignored during the commit process. This is useful for files that are generated automatically, such as log files, or files that contain sensitive information, such as passwords.