In this video, tell Git to change to a different branch.
- [Presenter] Now that we know how to create a branch, … let's see how we can switch to it. … In the last movie, we learned to use the Git Branch Command, … both to view a list of the branches … and also to create a new branch … and we created a new feature branch. … And then we can see both of those here and we can tell … that master is the currently checked out branch, … the branch that we're currently working with. … If we go to our working directory, … that's the code that we're going to see. … If we want to use the new feature branch instead, … well then we need to check it out. … So we use the command, git checkout … and then the name of the branch that we want … because we may have many of them. … So git checkout new_feature, … now, it says Switched to branch new_feature. … Type git branch again and you can see … that it is changed and now my current … working directory is new_feature. … That means that the head pointer … is now pointing at new_feature. … And if I make commits, they'll go on …
- 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.