Git

2 flashcards · Computer Science · by Achilleas Eva

  1. Tracking a folder:

    Go to the folder. Write git int . git add . git commit -m "commit message"

  2. How to delete last commit?

    Deleting a commit in Git must be approached in one of two ways, depending on if you have or have not pushed your changes. Please note before attempting this, running these commands will DELETE your working directory changes. Any changes to tracked files in the working tree since <commit> are discarded. Be sure to separately save any changes you'd like to have. If your changes have not been pushed yet simply enter the command git reset --hard HEAD~1 Alternatively, if you have already pushed your…