Maybe you added a file to your repository in error. Maybe you want to include files, but omit them from source control. Follow along as Chad Thompson teaches you how to use the Git remove command to remove any accidental additions, and add files to the ignore list. After watching this video, Git novices will be able to remove files from their Git changelist and prevent future accidental additions.

Advance your Git skills with Safari Learning Paths.


Chad Thompson is a software developer and DevOps specialist with nearly 20 years of experience creating web applications and supporting web infrastructure. Recently, Chad has been embracing and implementing “infrastructure as code” applications and supporting customer facing web, API, and mobile apps. Chad has devoted his expertise to leading organizations in transforming applications and processes, first for the web and now the cloud. Holding a master’s degree in physics from the University of Iowa, Chad has been creating web applications since the early days of HTML and is certified in Puppet, Oracle, and Amazon Web Services technologies.

Article image: Screen from "How do I undo additions to a repository before a Git commit?" (source: O'Reilly).