Câu hỏi phỏng vấn Git
Câu hỏi

What is the difference between git clone ,...

Câu trả lời

The main differences between git clone, git clone --bare, and git clone --mirror are:

git clone

  • Creates a full copy of the repository, including the working directory and .git directory[1][2][4]
  • Allows you to work on the files and commit changes[1][2]
  • Maintains a connection to the original repository, allowing you to push and pull changes[1][2]

git clone --bare

  • Creates a repository without a working directory[1][2]
  • Only contains the .git directory, which has all the repository data[1][2]
  • Useful for creating a bare repository to serve as a remote repository for others to clone or push to[1][2]
  • Cannot be used to work on files directly[1][2]

git clone --mirror

  • Creates an exact copy of the original repository, including all branches and tags[1][2]
  • Like git clone --bare, it creates a repository without a working directory[1][2]
  • ...
senior

senior

Gợi ý câu hỏi phỏng vấn

junior

How does the Centralized Workflow work?

senior

Can you explain what git reset does in plain English?

expert

Do you know how to easily undo a git rebase?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào