nerdexam
Linux_Foundation

LFCA · Question #15

Which of the following Git commands creates a new, empty Git repository?

The correct answer is D. git in it. The git init command initializes a new, empty Git repository in the current directory.

Submitted by jaden.t· May 4, 2026DevOps Fundamentals

Question

Which of the following Git commands creates a new, empty Git repository?

Options

  • Agit clone
  • Bgit fork
  • Cgit pull
  • Dgit in it

How the community answered

(27 responses)
  • A
    4% (1)
  • B
    4% (1)
  • D
    93% (25)

Why each option

The `git init` command initializes a new, empty Git repository in the current directory.

Agit clone

`git clone` copies an existing remote repository into a new local directory.

Bgit fork

`git fork` is a GitHub/GitLab specific operation to create a server-side copy of a repository, not a standard Git command-line operation for creating a new local repo.

Cgit pull

`git pull` fetches changes from a remote repository and integrates them into the current branch.

Dgit in itCorrect

The `git init` command creates a new, empty Git repository in the current directory, setting up the necessary `.git` subdirectory and initial files for version control.

Concept tested: Git repository initialization

Source: https://git-scm.com/docs/git-init

Topics

#Git#Version Control#Repository Management#git init

Community Discussion

No community discussion yet for this question.

Full LFCA Practice