git add state design pattern.