Git Fundamentals

Level up with "Git Fundamentals"

Access all lessons in this tutorial.

No spam, unsubscribe at any time.

This is a free tutorial

In exchange for your email address, you'll get full access to this and other free Epic Web Dev tutorials.

Why? First and foremost, your inbox allows us to directly communicate about the latest Epic Web Dev material. This includes free tutorials, tips, and periodic update about trends, tools, and happenings in Web Development that I'm excited about.

In addition to the piles of free Epic Web Dev content, you'll get the earliest access and best discounts to the paid courses when they launch.

There won't be any spam, and every email you get will have an unsubscribe link.

If this sounds like a fair trade, let's go!

Current section: Commands 17 exercises
lesson

Git Tracking and Staging Files

When we ran git status inside of our repository in our previous lesson , we were told that there is nothing to commit, and that we should make files and add them. So let's do that!

Create Files with echo

The echo command can be used to write text into new files.

The following commands wi

Subscribe to unlock this lesson.

Transcript

00:00 When we ran git status inside of our repository, we were told that there is nothing to commit, and that we should make files and add them. So let's do that. Let's echo a githelp heading into a githelp.txt file and repeat that for init and status.

00:20 Typing ls we should see three files. Let's run git status again. We have a new category now for untracked files. We can add them with the git add subcommand. Let's do that with a file name like it's suggesting here. git add githelp.txt. Run git status again. Now we have an additional

00:39 section, changes to be committed. Note that these aren't committed yet, but they're staged for commit. If we want to stage the rest of these files, we can do them individually with git add, but we can use the dot shortcut to add everything that hasn't been added to the index. Finally,

00:56 run git status one last time to see that everything has been moved into our index and staged for commit.

Full Stack Vol 1
You might also like

Full Stack Vol 1

Kent C. Dodds
Kent C. Dodds

A comprehensive guide to full stack development

166 Interactive Exercises ・ Progress Tracking ・ Completion Certificate
Learn more