Learn how to reference the parents, grandparents, and other ancestors of a commit.
- [Instructor] In this movie, we'll continue our discussion … of how you can reference commits in Git … by talking about ancestry. … If you remember, when we make commits, … they form a long chain … and every commit links to the commit that comes before it. … So most commits are going to have a parent commit, … a grandparent commit, and even a great-grandparent commit. … That's what we're talking about when we say ancestry. … Let's start by talking about how you can refer … to the parent commit. … It's very easy. … All you do is take a reference to a commit … and then add a caret symbol after it. … That's that upward-pointing arrow on your keyboard. … You may not use it very often, but it's useful here. … It's a symbol to tell us that we want to take this commit … and then go to its parent commit, … the one that comes right before it in the chain. … And we can do this with any kind of commit, an identifier. … For example, we can use head. … head followed by the caret sign … says get the parent of the head commit, …
- Finding and viewing commits
- Creating and switching branches
- Comparing branches
- Resetting branches
- Merging branches
- Stashing uncommitted changes
- Setting up a remote repository
- Creating remote branches
- Fetching and pushing changes to a remote
- Enabling remote collaboration
Skill Level Beginner
1. Navigate the Commit Tree
3. Reset Branches
4. Merge Branches
5. Stash Changes
6. Set Up a Remote
7. Collaborate with a Remote
Next steps3m 40s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.