Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9127085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:12:04+00:00 2026-06-17T07:12:04+00:00

I check out a project with git clone , added some files, and edited

  • 0

I check out a project with git clone, added some files, and edited the README.md that had been check out.

When I do a git commit, I get this advice to add the file that I’ve checked out.

# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   README.md
  • Why is this file not staged?
  • What can I do to so that this file will be automatically staged?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:12:05+00:00Added an answer on June 17, 2026 at 7:12 am

    Git doesn’t add the changed files and new files to the commit. First you need to change the files to the index stage (changes to be commited). You can do this with git add file for new and modified files or git rm for removed files. Only the files that are listed in “changes to be commited” when you use git status will be commited when you perform a git commit.

    One simple way to add changed files automatically when you perform a git commit is to pass the option -a: git commit -a. This way, all changed files will be commited. However, new files and removed files will be not commited. If you want to commit only some changed files, you need to add each one manually with git add.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I added some Haml templates to my Rails 3 project with git clone git://github.com/psynix/rails3_haml_scaffold_generator.git
Has anyone had this unusual(recurring) experience before? I'm trying to check out the project
I am trying to clone a TFS project using git-tfs and I didn't get
I'm working on a project and it seems that every time someone checks out
Check out this jsbin . I have a form with a custom button that
I have a remote project that have a branch. So I first clone the
I've recently been introduced to git in a project I've started working on, which
I encounter a strange behavior of m2e on eclipse: Clone project from remote git
I have a vb.net (visual studio 2010) project that is version controlled with git
is git clone -b branch1 ssh://gitolite@host/project/testkit equivalent to git clone ssh://gitolite@host/project/testkit cd testkit git

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.