CS FundamentalsHardProduct-company DevOps interview
A CI job runs git clone --depth 1 on a large repository. Which statement is correct?
- A. It downloads only the latest commit's snapshot, saving time, but commands needing history (such as git describe, git log of old commits or some merges) will not work without fetching more
- B. It clones only the first file
- C. It clones all history but compresses it more
- D. It cannot be used for building
Correct answer: A. It downloads only the latest commit's snapshot, saving time, but commands needing history (such as git describe, git log of old commits or some merges) will not work without fetching more
A shallow clone truncates history to the given depth. It is ideal for building one commit, but tools that compute versions from tags or diff against older commits need --unshallow or a larger depth.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- Assertion (A): Raising average server CPU utilisation from 50% to 95% to save cost usually makes response times much worse. Reason (R): In…
- In 30 days a service had 4 incidents with total downtime of 6 hours. What are its mean time between failures (uptime-based) and its…
- A team distinguishes elasticity from scalability. Which statement is correct?
- A team considers splitting its monolith into microservices. Which of these is the strongest reason to do it?
- A team's stand-up asks each person what they did yesterday, will do today and what blocks them. During it, two developers start a…
- How many of these statements about virtualisation and containers are correct? 1. A Type 2 hypervisor runs on top of a host operating…