In this video, use Git to compare the changes in two different branches.
- [Instructor] Once we have several branches, … we have the ability to compare them … to see what the differences are between their change sets. … Let's see how to do it. … And let's start by just typing git branch … to remind ourselves what branches we have, … and what the current working branch is. … So for the moment I'm on the shorten title branch. … In order to compare two things in git, … we can use git diff. … And we can use it to compare two files … or any tree ish. … So that would be, in this case, a branch. … Let's pick the master branch. … We'll use dot dot to compare it to the new_feature branch. … Notice that I'm not on either of those branches. … I can diff anything that Git knows about. … I'll hit return, … and it will come up and it will tell us … what's the difference. … We can see very clearly … that there's a change to this one line, … and we can see what this change is. … We can also change this. … Instead of new feature let's do master … compared to shorten_title. …
- 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.