0
点赞
收藏
分享

微信扫一扫

How to fix "modified content, untracked content" in git?

求索大伟 2023-08-01 阅读 84

 

 

How to fix "modified content, untracked content" in git?

 

What I did was to run:

git rm -rf --cached myuntrackedfolder

This tells git to forget about it (since it was being tracked formally).

Then I used:

git add myuntrackedfolder

to add it and I was good to go.


Remove .git from subfolders. This works for me.


Solution involves removing .git/ from the directories with the "modified content, untracked content" label, removing the --cached filed from those directories, and then running git add on those directories once again.

Step-by-step solution:

  1. Remove .git/ from log4cplus and ../lib/notification/cppzmq.
  2. From parent directory from where you initialized your git repository, run the command: git rm -rf --cached log4cplus/ && git rm -rf --cached ../lib/notifications/cppzmq
  3. Add and commit the directories to your branch again.
  4. Push to your branch.

Happy coding.

Tags:

Git

Git Submodules

 https://newbedev.com/how-to-fix-modified-content-untracked-content-in-git



举报

相关推荐

0 条评论