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 'origin/zeromq'.
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)
(commit or discard the untracked or modified content in submodules)
modified: log4cplus (modified content, untracked content)
modified: ../lib/notification/cppzmq (modified content)
The directory structure looks like this:
HySecureGateway
├──fes
│ └──log4cplus
│ ├──.git
│ ├──.gitattributes
│ ├──.gitignore
│ ├──.gitmodules
│ ├──catch
│ │ ├──.git
│ │ ├──.gitattributes
│ │ ├──.github
│ │ ├──.gitignore
│ │ └──.github
│ │ ├──issue_template.md
│ │ └──pull_request_template.md
│ └──threadpool
│ └──.github
└──lib
└──notification
└──cppzmq
├──.git
└──.gitignore
I read an answer of to a similar question here:
How to track untracked content? ,
and couldn't understand it completely. Also the logc4plus/.gitmodules contains this:
[submodule "threadpool"]
path = threadpool
url = https://github.com/log4cplus/ThreadPool.git
[submodule "catch"]
path = catch
url = https://github.com/philsquared/Catch.git
git diff
to find out which files have been modified,git status
will already tell you that. Whatever files you want to track, justgit add
them, then commit, that's it. – Elongationgit add
is not adding the file, then my guess is that this file is part of your.gitignore
file. And with good reason; whoever setup those files doesn't want you adding these system files. – Elongationsubmodules
? – Pickard