Branching and Merging: Practice & Reading
Dealing with a merge conflict
I've set up a very basic website project on GitHub. It has two branches, and I have set up the files that they will give you a merge conflict when you try to merge them to give you practice.
Bring down the branches
- Clone this repository: https://github.com/katebron/class_merge_demo
- Run git branch -a to see all the branches
- To automatically set up a new branch and pull my additional GitHub branch into it, run
- Run git diff to see the differences betwen the two branches
git checkout change_index
Merge the branches
In this exercise, I'd like you to merge the change_index branchinto master. Try to do this part on your own - feel free to Google. I will have 'solutions' next week.
- Move to master
- Merge change_index into master
- Deal with the merge conflict
Articles to Read
Please read one or both of these articles and post to the forum about one thing you've learned, or one thing you want to learn more about.
Want to learn more? Try out additional commands & merge tool
Try out a merge tool or other strategy for dealing with merges and conflicts (see article above). Post to the forum about it.