1

I already did these commands after I made some huge modifications in my app:

git status git add . git commit -m "deploying live with heroku" 

but still it didn't commit as I see alot of untracked files that are color red

and also I see this after issuing that commit..

On branch master Changes not staged for commit: ..............< all these modules here Untracked files: ...................... no changes added to commit 
8
  • Possible duplicate... Commented Nov 2, 2019 at 7:48
  • Make sure you run git add . in the root directory of your project. It adds the content of the current directory. Commented Nov 2, 2019 at 7:59
  • I already did @axiac look at this pastebin.com/MDEEr8S5 for seeing the end part of the result of the git status after i did git add . Commented Nov 2, 2019 at 8:00
  • It is a line-ending problem. Windows uses two characters (CR and LF) to end the lines of text files, Git internally uses only LF (Unix line-ending style). Commented Nov 2, 2019 at 8:04
  • It could be solved by configuring Git properly but I think it is better to avoid it. Nowadays most Windows text editors can handle files that use the Unix line-ending convention. Commented Nov 2, 2019 at 8:09

2 Answers 2

1

try following command to add untracked and modified files to staging index.

git add -A; 
Sign up to request clarification or add additional context in comments.

5 Comments

I get this fatal: unable to stat 'composer.': No such file or directory
check link stackoverflow.com/questions/14161297/… to resolve fatal issue.
Yeah there's a file that was named composer. which could be a big issue for git probably because it was named without a file name.
When I try to do like : git rm "composer." fatal: pathspec '.' did not match any files
can you print git status output if you are ok with it? If yes then only print relative path w.r.t root directory of project.
-3

Try these commandm It will work. Add your files into staging by this command $ git add --a

$ git status -s $ git add --a git commit -m "Your Commit Message" git push -u origin master 

4 Comments

$ git commit -m "first heroku deploy" On branch master Untracked files: ................ ..... nothing added to commit but untracked files present ```
There is no such option as --a. You probably want -a but it doesn't help here. Also, git push is not related to the question and it doesn't help.
@axiac Apparently Git interprets --a as --all, I suppose because there's no ambiguity. The equivalent short form would be -A.
Exactly sir, i mostly used this. I told him

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.