Join Our Community!

Connect with fellow tech enthusiasts on "The Weaver Birds" community. Share ideas, ask questions, and collaborate with others passionate about technology!

Join Now

Bring Us to Your Campus!

Interested in hosting a workshop? Contact us if your university wants to invite Engineeous to conduct a session on this topic or any other tech subject!

Request a Workshop

Let’s Work Together!

Looking for expert help? If you want to hire Engineeous for your next project, reach out to us today to discuss how we can collaborate!

Get in Touch

Git Commit

Now that you've created your `index.html` file, it's time to start tracking it with Git. To do this, you'll use the `git add` command to tell Git to keep an eye on the file, and then you'll use the `git commit` command to save a snapshot of your work.

Add Your File to the Repository

Before you can save your changes, you need to add the file to Git's "staging area." This is like telling Git, "Hey, I'm ready to save this file!"

  1. Run the following command to add the index.html file to version control:

    
    git add index.html
  2. After running the command, you'll see something like this when you check the status with `git status`:

    
    On branch master
    
    No commits yet
    
    Changes to be committed:
      (use "git rm --cached ..." to unstage)
        new file:   index.html
    

    This means that `index.html` is now staged, or ready to be committed. It's like putting a stamp on a letter before mailing it.

Commit Your Changes

Now that your file is staged, you can save a snapshot of your work by committing the changes.

  1. Run the following command to commit your changes:

    
    git commit -m "First Commit"

    The `-m "First Commit"` part is where you add a message describing what you've done. In this case, the message is "First Commit," but you can write anything that makes sense to you.

  2. After committing, you'll see something like this:

    
    [master (root-commit) 0746f1f] First Commit
     1 file changed, 1 insertion(+)
     create mode 100644 index.html

    This tells you that your `index.html` file has been successfully committed.

Check the Status Again

To make sure everything is in order, you can run the `git status` command again:


git status

You should see:


On branch master
nothing to commit, working tree clean

This means you've successfully committed your changes, and your project is up to date!

Make changes

Subscribe to our newsletter

We will make sure that you never miss anything again! Stay rest assured about our emails as we do not spam your inbox.