TODO

Task 1

Create documentation for a new language:
  1. Create a new project learn_language_name example learn_go in your user space

  2. Add a new file README.md

  3. Update file with information:

    1. how to install language on WSL

    2. how to run hello world

    3. how to declare data structures

    4. how to user conditions and loops

    5. what are the advantages compared with another language

Questions

  1. What is the difference between git and GitHub?

    1. Git is a version control system, GitHub is a hosting service for Git repositories.

    2. Git is a hosting service for Git repositories, GitHub is a version control system.

    3. Git is a version control system, GitHub is a version control system.

    4. Git is a hosting service for Git repositories, GitHub is a hosting service for Git repositories.

  2. What is the difference between git pull and git fetch?

    1. 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.

    2. 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.

    3. 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.

    4. 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.

  3. What command is used to download a repository from GitHub to your local machine?

    1. git commit

    2. git push

    3. git fork

    4. git clone

  4. Which of the following commands will show you the history of commits in your repository?

    1. git log

    2. git commit

    3. git status

    4. git branch

  5. How do you create a new branch and switch to it immediately?

    1. git branch new-branch

    2. git checkout new-branch

    3. git checkout -b new-branch

    4. git merge new-branch

  6. What does the git status command do?

    1. Displays the commit history

    2. Lists all branches

    3. Shows the status of changes as untracked, modified, or staged

    4. Shows the current branch name

  7. What is the purpose of .gitignore file?

    1. To ignore files during the commit process

    2. To list collaborators on the project

    3. To specify the remote repository URL

    4. To ignore files when pulling updates from remote

Answers

  1. 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.

  2. Answer: c

    Explanation: 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 is a combination of git fetch and git merge.

  3. 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, and git fork is used to create a copy of a repository on GitHub.

  4. 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.

  5. 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.

  6. 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.

  7. 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.