Learn how to switch to another branch with uncommitted changes in the working directory.
- [Narrator] We've seen how easy it is to … switch branches in Git. … But there is a potential road block, … that can keep us from switching, … and I want us to look at it. … Inside my Explore California project, I already … have a couple of branches. … You can see I have Master, New Feature, and Shorten Title. … The currently checked out branch is Shorten Title. … You can type Git Status. … We can see that currently, I have nothing to commit. … Everything has been committed, … my working directory is clean. … Let's now make a change. … Let's go into our project, and let's change … Explore California from being a dash, … to being a colon. … So I'm just going to make that one tiny little change. … Let's save it. … Now, I have a change. … If I type Git Status, you'll see that the change is there. … These changes are not committed. … Let's try it. … Let's type Git Checkout Master. … Git won't let us do it. … And it tells us, it says your local changes … to the following files would be … overwritten by checkout: index.html. …
- 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.