Git
Exercise1
  1. Create folder named git_exercise
  2. Navigate inside the folder
  3. Initialize it to empy git repository
  4. Create file named first.txt and add a row "row 1"
  5. Add all files to the staging area
  6. Commit with a message "my first commit"
  7. Add a row "row 2" to file first.txt
  8. Add all files to the staging area
  9. Commit with a message "my second commit"
  10. Reset your repo to the stage of the first commit and check that the row2 is deleted
  11. Reset your repo to the stage of the second commit and check that the row2 is on the file
  12. Create new branch named hotfix1
  13. Create new file named second.txt and add some text to it
  14. Add all files to the staging area
  15. Commit with a message "hotfix1 commit"
  16. Checkout to master
  17. Check that file second.txt is "not on the directory"
  18. Merge branch hotfix1 to master
  19. Check that file second.txt is on the directory
Video about the exercise



Toggle Menu