0
0
Gitdevops~5 mins

Golden rule of rebasing (never rebase public) in Git - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the golden rule of rebasing in Git?
Never rebase public branches that others might be using or have pulled.
Click to reveal answer
beginner
Why should you avoid rebasing public branches?
Because rebasing rewrites history, it can cause conflicts and confusion for others who have the original history.
Click to reveal answer
intermediate
What happens if you rebase a public branch that others have pulled?
Others will have to manually fix their history, which can lead to errors and lost work.
Click to reveal answer
beginner
When is it safe to use git rebase?
When working on local or private branches that no one else is using yet.
Click to reveal answer
beginner
What is a safer alternative to rebasing public branches?
Use git merge to combine changes without rewriting history.
Click to reveal answer
What does the golden rule of rebasing advise?
ANever rebase public branches
BAlways rebase public branches
CRebase only after merging
DRebase only on remote branches
Why is rebasing public branches risky?
AIt deletes the branch
BIt rewrites commit history
CIt merges changes automatically
DIt creates new branches
Which command is safer for public branches?
Agit rebase
Bgit reset
Cgit merge
Dgit stash
When is it okay to use git rebase?
AOn local private branches
BOn public branches
COn remote branches
DOn merged branches
What problem can rebasing public branches cause for others?
AThey cannot push changes
BThey lose access to the repository
CThey get automatic updates
DThey must fix their history manually
Explain why the golden rule of rebasing says 'never rebase public'.
Think about what happens when history changes after others have copied it.
You got /4 concepts.
    Describe a safe workflow for using git rebase without breaking collaboration.
    Consider when rewriting history is safe and when it is not.
    You got /4 concepts.