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
*   9d0aceb 2014-10-25 | Merge branch 'master' into greet (greet) [Jim Weirich]
|\  
* | 12414e9 2014-10-25 | Updated Rakefile [Jim Weirich]
* | 43ba308 2014-10-25 | Hello uses Greeter [Jim Weirich]
* | acd8535 2014-10-25 | Added greeter class [Jim Weirich]
| | * 8697f14 2014-10-25 | Made interactive (HEAD, master) [Jim Weirich]
| |/  
| * 6fd9eff 2014-10-25 | Added README [Jim Weirich]
|/  
* 14ba469 2014-10-25 | Added a Rakefile. [Jim Weirich]
* 4b249b3 2014-10-25 | Moved hello.rb to lib [Jim Weirich]
* bfd1408 2014-10-25 | Add an author/email comment [Jim Weirich]
* a1189df 2014-10-25 | Added a comment (tag: v1) [Jim Weirich]
* 6083cb8 2014-10-25 | Added a default value (tag: v1-beta) [Jim Weirich]
* b24f3ff 2014-10-25 | Using ARGV [Jim Weirich]
* cf466b4 2014-10-25 | 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