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

senior

How do you make an existing repository bare?

junior

What's the difference between a pull request and a branch ?

senior

What is the HEAD in Git?

Bình luận

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

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