Check Status
Now that you've set up your local Git repository, it's time to start making changes and saving those changes as snapshots in your repository. Each time you reach a point where your project is in a good state, you can "commit" these changes to record them.
Tracked vs. Untracked Files
In Git, files in your working directory can be in one of two states:
- Tracked: Files that Git is keeping an eye on. These files are part of the repository and are being monitored for changes.
- Untracked: Files that Git doesn't know about yet. These files are not part of the repository until you tell Git to track them.
Check the Status of Your Files
You can check the status of your files using the `git status` command. This command will show you which files are tracked, which are untracked, and what changes have been made.
To check the status:
- Make sure you're inside your project folder ("university").
Type the following command:
git status
You should see something like this:
On branch master No commits yet Untracked files: (use "git add
..." to include in what will be committed) index.html nothing added to commit but untracked files present (use "git add" to track)
This tells you a few important things:
- On branch master: You're working on the "master" branch, which is the main line of development in your repository.
- No commits yet: You haven't saved any snapshots (commits) of your project yet.
- Untracked files: Your index.html file is untracked, meaning Git hasn't started keeping an eye on it.
What's Next?
Now that you know the status of your files, the next step is to tell Git to start tracking your `index.html` file. This way, you can commit it and start saving snapshots of your work!