use api to handle git