Advanced Operations
We're starting to have a really good grasp of how to use Git properly. We know the commands used to work with the local repository and branches therein, how to interact with remote repositories and branches, and how to collaborate effectively with other people through the use of branching models.
So, now, we'll talk about a few Git operations we didn't mention before. Those are more advanced, less commonly used operations, compared to the basic add
, commit
, pull
and push
operations.
Although they're not as commonly used as the first category, they're nonetheless important and very useful when it comes to working with Git.
We'll cover a few new operations in this lesson:
- The
stash
operation that allows us to save uncommitted changes, for later reuse, in a dedicated space of the repository. - The
tag
operation which allows us to label a commit to retrieve it easier, instead of using commit hashes. - The
reset
andrevert
operations, for when we're not happy with the work we've currently achieved and want to rollback some modifications. - The
cherry-pick
operation, which allows us to copy the content of a single cherry-picked commit of another branch. A practical, but risky way of selectively picking and applying changes from another branch. - The
git diff
operation, which allows us to take a look and compare differences between files. - The
commit --amend
operation, which allows us to modify the latest commit. - We'll see how to perform an interactive rebase, which is a fine-grained version of the rebase we already know.
- Finally, we'll take a look at how to perform interactive staging, which is also a fine-grained version of staging files like we usually do.
Start course to continue