On September 14th, 2017, we published revised versions of our Privacy Policy, Terms of Service and Website Use Policy and published a Cookie Policy. Your continued use of Lynda.com means you agree to these revised documents, so please take a few minutes to read and understand them.

We now know how to switch between branches in Git, and we also know that the process …of doing that is to use the checkout command, and what the checkout command does is it tells …Git to go and get the latest version of the branch and to make our working directory look exactly like it. …There is one thing that you need to be cautious about with that, which is that your working …directory must be clean in order to switch. Actually, mostly clean. We'll talk about that later, …but if it's not clean, then Git won't let you do the switch. …Let's take a look. …Right now, I'm on my shorten title branch, I do git status, you will see that right now …my working directory is clean.…

Let's make a change. …So I'm going to make a change to index.html, …open it up, and in the same line that I changed before, I'm going to change the …hyphen to be a colon. …I am going to save my changes and close it. …So now we have an unsaved change, not stage for commit or anything, just sitting in our …working directory. …

Resume Transcript Auto-Scroll

Author

Released

8/24/2012

The course shows how to use Git, the popular open-source version control software, to manage changes to source code and text files. Using a step-by-step approach, author Kevin Skoglund presents the commands that enable efficient code management and reveals the fundamental concepts behind version control systems and the Git architecture. Discover how to track changes to files in a repository, review previous edits, and compare versions of a file; create branches to test new ideas without altering the main project; and merge those changes into the project if they work out. The course begins by demonstrating version control in a single-user, standalone context, before exploring how remote repositories allow users to collaborate on projects effectively.

Topics include:

Exploring the history of version control

Installing Git on Mac, Windows, and Linux

Initializing a repository

Writing useful commit messages

Understanding the Git three-tree architecture

Tracking when files are added, edited, deleted, or moved

Viewing change sets and comparing versions

Undoing changes and rolling back to previous versions

Ignoring changes to select files

Creating and working with code branches

Merging branches and resolving merge conflicts

Stashing changes for later

Working with hosted repositories and remote branches

Developing an effective collaboration workflow

Skill Level Beginner

6h 25m

Duration

4,168,402

Views

Show MoreShow Less

Q: In the Chapter 10 movie "Configuring the command prompt to show the branch," when I type the function "__git_ps1," I do not get the expected result.

Q: When I use the code the instructor advises in the above video ("git config --global user.name "Nelda Street"), I still get an "Illegal Instruction" error. I have OS 10.6.8. Am I doing something wrong?

A: The current installer version of git isn't compatible with older Mac OS versions.