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

When would you use git clon...

Câu trả lời

Here is a concise answer to the interview question:

You would use git clone over git clone --mirror when you want to create a regular working copy of the repository for development purposes, rather than a complete mirror. The key differences are:

  • git clone creates a working directory with a .git subdirectory, while --mirror creates a bare repository with no working directory[1][3].
  • git clone sets up remote-tracking branches (e.g. origin/master), while --mirror directly maps remote branches to local branches[3].
  • git clone is suitable for developers who need to make local edits, while --mirror is intended for full replication of the repository for backup or migration purposes[1].

So in sum...

senior

senior

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

middle

How to revert previous commit in git?

junior

What is the difference between git pull and git fetch ?

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