lab 29 Creating a Conflict
Goals
- Create a conflicting change in the master branch.
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 * 4ce379e 2013-10-06 | Merge branch 'master' into greet (greet) [Ismail Dhorat] |\ * | 7a5c511 2013-10-06 | Updated Rakefile [Ismail Dhorat] * | 815cf27 2013-10-06 | Hello uses Greeter [Ismail Dhorat] * | 209ff42 2013-10-06 | Added greeter class [Ismail Dhorat] | | * 2957100 2013-10-06 | Made interactive (HEAD, master) [Ismail Dhorat] | |/ | * 313c04d 2013-10-06 | Added README [Ismail Dhorat] |/ * b3e19a3 2013-10-06 | Added a Rakefile. [Ismail Dhorat] * 14f09c0 2013-10-06 | Moved hello.rb to lib [Ismail Dhorat] * 1fed2ec 2013-10-06 | Add an author/email comment [Ismail Dhorat] * dc44f2e 2013-10-06 | Added a comment (v1) [Ismail Dhorat] * 5ec54fd 2013-10-06 | Added a default value (v1-beta) [Ismail Dhorat] * e606a20 2013-10-06 | Using ARGV [Ismail Dhorat] * 5d95e74 2013-10-06 | First Commit [Ismail Dhorat]
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.