how does git work