example for checking out from staging area or commit