1

I am trying to push updates to my git repo from my CLI, but "git add ." is not doing anything. When I run that command, I get a blank line in my terminal that does nothing, and I eventually kill the process. I would share code, but I have no idea where the source of the problem could even be. I did recently add a collaborator to my git repo, so maybe that has something to do with it? I've never had this problem before. Does anyone know why this might be happening?

EDIT: this is the output of git status:

On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

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:   client/src/components/ExploreDirectory/ExploreDirectory.js
    modified:   client/src/components/ExploreDirectory/exploredirectory.css
    modified:   client/src/components/ProposalBox/ProposalBox.js
    modified:   client/src/components/ProposalBox/proposalbox.css
    modified:   client/src/pages/explore/all/All.js
    modified:   client/src/pages/explore/all/all.css
    modified:   client/src/pages/explore/arts/Arts.js
    modified:   client/src/pages/explore/arts/arts.css
    modified:   client/src/pages/explore/directAction/DirectAction.js
    modified:   client/src/pages/explore/directAction/directaction.css
    modified:   client/src/pages/explore/explore.css
    modified:   client/src/pages/explore/sciences/Sciences.js
    modified:   client/src/pages/explore/sciences/sciences.css

Untracked files:
  (use "git add <file>..." to include in what will be committed)

    .DS_Store
    models/
    node_modules/
    src/

no changes added to commit (use "git add" and/or "git commit -a")

1 Answers1

2

That happens when git add is in the process of adding;

  • too many files
  • and/or files which too big

That is why git status can help pinpoint what you are about to add.
See "Can I make “git status” show the file size of untracked files?"

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • added "git status" output to my question. do i have to add each of these files individually to stage them for commit? – user72503948573038 Aug 11 '20 at 19:38
  • @user72503948573038 You need first to add a .gitingore tailored for node/npm projects: https://www.toptal.com/developers/gitignore/api/node. Then you can add everything in one go: `git add .`: it will not include files which are not needed and/or potentially too big. Because they will be ignored by the `.gitignore` file. – VonC Aug 11 '20 at 20:10