CS FundamentalsModerateWipro · Accenture pattern
What is the difference between git fetch and git pull?
- A. git fetch merges remote changes; git pull only downloads them
- B. git fetch only downloads remote commits into remote-tracking branches; git pull fetches and then merges (or rebases) them into the current branch
- C. git fetch works only on tags; git pull works on branches
- D. They are identical aliases
Correct answer: B. git fetch only downloads remote commits into remote-tracking branches; git pull fetches and then merges (or rebases) them into the current branch
git pull = git fetch + git merge (or git rebase with --rebase). git fetch never touches your working branch, which makes it the safe way to look before integrating.
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
- The 'O' in SOLID states that a software module should be:
- Which statement correctly describes a Type 1 hypervisor?
- Why do containers usually start faster and use less memory than virtual machines?
- Which of these is one of the four value statements of the Agile Manifesto?
- After a bug fix, the team re-runs previously passing tests to make sure nothing that used to work is now broken. This is:
- Which combination indicates a good modular design?