1

I am having trouble adding untracked files or modified files on git. This is the message I am getting:

On branch homework110515 Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory) (commit or discard the untracked or modified content in submodules)

modified:   MarcoPortfolio (untracked content)
modified:   session2.2 (modified content)
Marcode777
  • 137
  • 1
  • 3
  • 10
  • 3
    Possible duplicate of [Adding Only Untracked Files](http://stackoverflow.com/questions/7446640/adding-only-untracked-files) – Greg Nov 06 '15 at 04:02

1 Answers1

8

You have pending changes in your workspace. To stage them for a commit you need to add them. Basically exactly what it says: "Changes not staged for commit". To stage changes you need to add them with the add command:

git add [file]

Typically I just add all the files in the working directory with:

git add .

At this point you can commit your changes with git commit -m "[message]"

Swoogan
  • 4,682
  • 4
  • 31
  • 39