lab 29 Creating a Conflict

Goals

Switch back to master and create a conflict 01

Switch back to the master branch and make this change:

Execute:

git checkout master

File: lib/hello.rb

puts "What's your name"
my_name = gets.strip

puts "Hello, #{my_name}!"

Execute:

git add lib/hello.rb
git commit -m "Made interactive"

View the Branches 02

Execute:

git hist --all

Output:

$ git hist --all
*   844d1ed 2013-04-13 | Merge branch 'master' into greet (greet) [Jim Weirich]
|\  
* | 28917a4 2013-04-13 | Updated Rakefile [Jim Weirich]
* | 4dac415 2013-04-13 | Hello uses Greeter [Jim Weirich]
* | 39347b3 2013-04-13 | Added greeter class [Jim Weirich]
| | * 05f32c0 2013-04-13 | Made interactive (HEAD, master) [Jim Weirich]
| |/  
| * b59a8c2 2013-04-13 | Added README [Jim Weirich]
|/  
* 96ee164 2013-04-13 | Added a Rakefile. [Jim Weirich]
* 0f36766 2013-04-13 | Moved hello.rb to lib [Jim Weirich]
* eb30103 2013-04-13 | Add an author/email comment [Jim Weirich]
* 1f7ec5e 2013-04-13 | Added a comment (v1) [Jim Weirich]
* 582495a 2013-04-13 | Added a default value (v1-beta) [Jim Weirich]
* 323e28d 2013-04-13 | Using ARGV [Jim Weirich]
* 9416416 2013-04-13 | First Commit [Jim Weirich]

Master at commit “Added README” has been merged to the greet branch, but there is now an additional commit on master that has not been merged back to greet.

Up Next 03

The latest change in master conflicts with some existing changes in greet. Next we will resolve those changes.

Table of Contents