corrected order of push/pull in commit function