Post/Code

HomeAboutUsesNow

Ng-Map grey area fix, 'pre-merge' branches, better conflict resolution tools?

  • If you get a grey area on first load of your Ng-Map, try this | Link

    //vm.map is the Ng-Map instance
    var center = vm.map.getCenter();
    google.maps.event.trigger(vm.map, "resize");
    vm.map.setCenter(center);
    
  • I had to do a fairly large merge with many conflicts today. My suggestion is to:

    git checkout branch-to-be-merged-into
    git checkout -b pre-merge-branchname
    git merge longlast-merged-branch
    

Once you have resolved all the conflicts, create a pull request from the pre-merge-branchname to the branch-to-be-merged-into. Then merge from there. This will, in theory, prevent you from screwing up your main branches by utilizing the pre-merge-branchname as a kind of staging area for your merge. However, it is best you do not let your branches get too far out of sync if possible. This will reduce the number of conflicts and be easier to manage.

  • On that note, VS Code is useful in that it highlights merge conflicts in the "map" on the right along with the purple highlights and C indicators. The trick is that, these colours/codes do not change once you have resolved, so you need to be sure to keep track and do your resolutions in a very methodical manner. I would however like to discover a better way to manage these conflicts? I am thinking something along the lines of a Beyond Compare-like side-by-side view with easy to use -> and <- buttons for 'Approve current' or 'Approve incoming' or to make a merge/manual edit of the conflicting lines.
  • I will be investigating this possibility next week: