From the course: Complete Guide to Git
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Prune stale branches - Git Tutorial
From the course: Complete Guide to Git
Prune stale branches
- [Narrator] In this movie, we will learn how to prune stale branches and learn when it is necessary. Pruning means to delete all of the stale branches. And a stale branch is a remote-tracking branch, which no longer tracks anything because the actual branch in the remote repository has been deleted. When we work with remote branches, there may be three different branches. There's the remote branch that actually exists in the remote repository, then there's the local snapshot of that remote branch, and then there's our local branch. If our branch was called bugfix, we could have a version on the remote called bugfix, we could have a local branch called bugfix, and in between is a snapshot of the remote branch, which is the remote-tracking branch. We've learned how to delete a local branch, and we learned how to delete a remote branch. But what about this remote-tracking branch? If I delete a remote branch, Git will automatically delete the remote-tracking branch at the same time…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Working with a remote2m 44s
-
(Locked)
Push changes to a remote5m 10s
-
(Locked)
Fetch changes from a remote4m 23s
-
(Locked)
Merge in fetched changes2m 44s
-
(Locked)
Work with new remote branches5m 54s
-
(Locked)
Push to an updated remote branch2m 50s
-
(Locked)
Delete a remote branch4m 14s
-
(Locked)
Prune stale branches4m 12s
-
(Locked)
Collaboration workflow5m 58s
-
(Locked)
Collaborating on open-source projects2m 57s
-
(Locked)
-
-
-
-
-
-