Branches are an excellent way to not only work safely on features or experiments, but they are also the key element in creating Pull Requests on GitHub. Let's take a look at why we want branches, how to create and delete branches, and how to switch branches in this episode.
Remove files from a Git repository with the git rm command. Learn how to version file deletions on the command line, stop tracking a file while retaining it on the file system, and how the GitHub desktop clients handle deletions.
Git facilitates moving files and folders and recording those changes in version history with the git mv command. Together, we'll explore ways of using this command and its siblings to track changes even when files are refactored or renamed. Additionally, we'll review common shortcuts to staging multiple files with multiple types of changes. Lastly, we'll leverage our created history and discover how to trace file history back through renames and path changes.
Git's implementation of tracking changes to files has a parallel in a thought experiment from philosophy titled the "Ship of Theseus." In this bonus episode, you'll learn a bit about why the percentage of change in a file matters, and how to adjust how Git visualizes such changes.