culTest

    One of the 24 questions in this topic

    How much do you know about Git & GitHub: History Engineering and Automation?

    Which command would you use to undo the last commit while keeping the changes in the working directory?

    Answers

    git reset --hard HEAD~1
    git reset --soft HEAD~1Correct
    git revert HEAD
    git delete commit

    The --soft flag removes the commit from history but leaves the files ready in the staging area.