How to fix “modified content, untracked content” in git?

前端 未结 6 867
逝去的感伤
逝去的感伤 2020-12-24 11:29

The objective is to commit a git branch. The output of \"git status\" for the branch is:

On branch zeromq_new
Your branch is up to date with         


        
6条回答
  •  失恋的感觉
    2020-12-24 12:25

    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.

提交回复
热议问题