Skip to content

lab 29 Creating a Conflict

Goals

Switch back to master and create a conflict

Switch back to the master branch and make this change:

Execute:

git checkout master

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

Execute:

git hist --all

Output:

$ git hist --all
*   2424440 2018-09-28 | Merge branch 'master' into greet (greet) [Jim Weirich]
|\  
* | 3f038a4 2018-09-28 | Updated Rakefile [Jim Weirich]
* | fa0b537 2018-09-28 | Hello uses Greeter [Jim Weirich]
* | 6f9af14 2018-09-28 | Added greeter class [Jim Weirich]
| | * 17a6c56 2018-09-28 | Made interactive (HEAD -> master) [Jim Weirich]
| |/  
| * 5c40874 2018-09-28 | Added README [Jim Weirich]
|/  
* 191f0c6 2018-09-28 | Added a Rakefile. [Jim Weirich]
* ef98cae 2018-09-28 | Moved hello.rb to lib [Jim Weirich]
* e1e08fd 2018-09-28 | Add an author/email comment [Jim Weirich]
* 7bf0bf1 2018-09-28 | Added a comment (tag: v1) [Jim Weirich]
* 9cf3f21 2018-09-28 | Added a default value (tag: v1-beta) [Jim Weirich]
* 94e1b8b 2018-09-28 | Using ARGV [Jim Weirich]
* f656098 2018-09-28 | 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

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