Coursera (Practice Quiz: Branching & Merging)

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

The following script contains the result of a merge conflict. Edit the code to fix the conflict, so that both versions are included. def main(): <<<<<<< HEAD print("Start of program>>>>>>>") ======= print("End of program!") >>>>>>> improvement-to-the-code main()

ANSWER: def main(): print("Start of program>>>>>>>") print("End of program!") OUTPUT: Start of program>>>>>>> End of program! Start of program>>>>>>> End of program! None

The following code snippet represents the result of a merge conflict. Edit the code to fix the conflict and keep the version represented by the current branch. <<<<<<< HEAD print("Keep me!") ======= print("No, keep me instead!") >>>>>>> brancho-cucamonga

ANSWER: Delete everything and keep print("Keep me!")

How do we display a summarized view of the commit history for a repo, showing one line per commit? 1. Git log --format = short 2. Git branch -D <name> 3. Git log --graph --oneline 4. Git checkout -b <branch>

Git log --graph --oneline

What command would we use to throw away a merge, and start over? 1. Git checkout -b <branch> 2. Git merge --abort 3. Git log --graph --oneline 4. Git branch -D <name>

Git merge --abort

When we merge two branches, one of two algorithms is used. If the branches have diverged, which algorithm is used? 1. Three-way merge 2. Fast-forward merge 3. Merge conflict 4. Orphan-creating merge

Three-way merge


संबंधित स्टडी सेट्स

Finance Chapter 6 Smartbook Questions

View Set

Econ 201 Entrepreneurship and Innovation

View Set

medical anatomy unit 11 test- cardiovascular system

View Set

Rock Pop, and American Culture (MUS 109) Final Study Guide Key terms

View Set

Intro to Comparative Politics Unit 1 Exam

View Set

Exothermic and Endothermic Reactions

View Set