I've got some files/folders that just wont leave the Git staging area?
# On branch master
# Changed but not updated:
# (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: JavaScript/Stand.ard.iz.er (modified content, untracked content)
# modified: Site (untracked content)
# modified: Template Archives/Template (modified content, untracked content)
# modified: Template Archives/Template_Git (modified content, untracked content)
#
I've tried everything to get these 'modified' files commited but with no luck?
I've tried...
git add .
git add *
git add -u
git add {actual full directory path}
...but none of it works.
Any ideas?
Thanks.
You might have to synchronise with your fork directory first and then perform git pull on your local branch. Basically you have to rebase your fork copy to get in sync with remote master and perform git pull in your local copy. 2. Just try to rebase your local work copy to be in sync with remote master.
Your file is already staged to be committed. You can show it's diff using the --cached option of git. To unstage it, just do what git status suggests in it's output ;) You can check The Git Index For more info.
Indexing. For every tracked file, Git records information such as its size, creation time and last modification time in a file known as the index. To determine whether a file has changed, Git compares its current stats with those cached in the index. If they match, then Git can skip reading the file again.
Those could be submodules, in which case their status would be displayed from the status of the parent repo.
Unless, that is, you use the --ignore-submodules[=<when>]
option of git status:
Ignore changes to submodules when looking for changes.
<when>
can be either "none
", "untracked
", "dirty
" or "all
", which is the default.
- Using "
none
" will consider the submodule modified when it either contains untracked or modified files or itsHEAD
differs from the commit recorded in the superproject and can be used to override any settings of the ignore option ingit-config
orgitmodules
.- When "
untracked
" is used submodules are not considered dirty when they only contain untracked content (but they are still scanned for modified content).- Using "
dirty
" ignores all changes to the work tree of submodules, only changes to the commits stored in the superproject are shown (this was the behavior before 1.7.0).- Using "
all
" hides all changes to submodules (and suppresses the output of submodule summaries when theconfig option status.submodulesummary
is set).
In any case, you would need to add and commit from within the submodules themselves, before being able to go up one level (at the parent repo level), and see clean status.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With