Git sync fork

@kevgo please review
Same here, use case-when to make this more succinct.