{ Advanced Git Exercises. }

Part I

Answer the following questions:

  • What is the difference between git reset and git revert. When would you use one over the other?
  • What is the difference between git merge and git rebase. When would you use one over the other?
  • What is the difference between git stash pop and git stash apply. When would you use one over the other?
  • What kinds of things can you do in interactive mode when rebasing?

Part II

It's time to practice some more with everything you have learned.

  • Create a local repository from the command line.
  • Add and commit files.
  • Push your repository up to GitHub.
  • Fork and Clone https://github.com/inf-paces/learn_forking.
  • Add and commit some changes and submit a PR.
  • Change to a different branch and add some files and merge into master when you are done.
  • Practice using revert to undo commits and rebase with interactive mode for a better commit history.
  • Submit another pull request, with squashed commits.

By now you should feel pretty comfortable working with Git, so push yourself to keep learning more! Start by reading the Advanced Overview on Atlassian and learn about the inner workings of Git and other advanced commands and flags that we have not shown you. Most of all, keep up the good work!

You can find the solutions here

Head Home

Creative Commons License