Hamas announced on Tuesday that it has signed an agreement in Beijing with various Palestinian groups, including Fatah, to pursue "national unity" and jointly govern Gaza post-war.