Remove resources in last commit from API register call