Git and GitHubLesson 26Free preview
Pull Branch from GitHub
This lesson is part of Git · All levels
Summary
You can pull a branch from GitHub and work on it locally. The way is git fetch to update the remote reference, then git switch -c with -track to create a local branch that follows the remote branch. If the branch remote is removed, clear out the obsolete reference with git fetch --prune.
Key points
- Git fetch origin updates the reference branch remote
- Git switch -c <nama> --track origin/<nama> makes a local branch of the remote
- Git fetch --prune clears remotely deleted references
- The merge conflict is resolved manually and then continued with git merge --continue
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.