Add merging functionality

Tree & blob merging functionality added