Add logic to add tracking branches remotes
Add first implementation of branch merging in merge() method

- Refactor the conflicting logic in local scope function safe_merge()
Fix branch merging logic