CS FundamentalsHardInfosys · GATE CS
Why is it advised not to run git rebase on commits already pushed to a shared branch?
- A. Rebase deletes the remote repository
- B. Rebase rewrites commit history, so collaborators' copies diverge
- C. Rebase cannot be used with branches
- D. Rebase always produces merge conflicts
Correct answer: B. Rebase rewrites commit history, so collaborators' copies diverge
Rebase creates new commits with new hashes; others who based work on the old commits must reconcile a rewritten history.
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
- A module of 30,000 lines of code has 45 defects found in testing. What is the defect density?
- Under the cloud shared responsibility model for IaaS (for example virtual machines), which task is the customer's responsibility?
- A Square class extends Rectangle and overrides setWidth so that it also changes the height, breaking code that expects independent width…
- A control-flow graph has 20 edges, 16 nodes and 2 connected components. Using V(G) = E - N + 2P, what is the cyclomatic complexity?
- Commits A-B-C-D-E are on the shared main branch and already pushed. Commit C introduced a bug. What is the safest way to undo only C's…
- A module contains functions to print to screen, write to a file and send over a network; a flag argument decides which one runs. Which…