首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >验证git模块中的更改

验证git模块中的更改
EN

Stack Overflow用户
提问于 2015-01-01 17:28:27
回答 1查看 334关注 0票数 1

我只是在git存储库中添加了一些更改。除了显示对.gitmodules的更改之外,一切都是好的,并且显示了在两个模块目录中未为提交而进行的更改。据我所知,我没有对.gitmodules或这两个目录做任何更改。如何确定在这些目录中修改了哪些文件,以及更改了哪些文件?

代码语言:javascript
复制
[Michael@devserver maindir]$ git add .
[Michael@devserver maindir]$ git status
On branch master
Your branch is ahead of 'origin/master' by 5 commits.
  (use "git push" to publish your local commits)
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   .gitmodules
        A BUNCH OF OTHER FILES WHICH I CHANGED

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:   application/classes_3rd/PHPMailer (modified content)
        modified:   application/classes_3rd/parsecsv (modified content)

[Michael@devserver maindir]$ cat .gitmodules
[submodule "application/classes_3rd/PHPMailer"]
        path = application/classes_3rd/PHPMailer
        url = https://github.com/Synchro/PHPMailer.git
[submodule "application/classes_3rd/parsecsv"]
        path = application/classes_3rd/parsecsv
        url = https://github.com/parsecsv/parsecsv-for-php.git
[Michael@devserver maindir]$

编辑。冯克的回答..。

代码语言:javascript
复制
[Michael@devserver maindir]$ cd application/classes_3rd/PHPMailer
[Michael@devserver PHPMailer]$ git status
HEAD detached at 245381c
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:   .gitignore
        modified:   .scrutinizer.yml
        modified:   .travis.yml
        modified:   LICENSE
        modified:   PHPMailerAutoload.php
        modified:   README.md
        modified:   changelog.md
        modified:   class.phpmailer.php
        modified:   class.pop3.php
        modified:   class.smtp.php
        modified:   composer.json
        modified:   docs/Callback_function_notes.txt
        modified:   docs/DomainKeys_notes.txt
        modified:   docs/Note_for_SMTP_debugging.txt
        modified:   docs/extending.html
        modified:   docs/faq.html
        modified:   docs/pop3_article.txt
        modified:   examples/LGPLv3.txt
        modified:   examples/code_generator.phps
        modified:   examples/contents.html
        modified:   examples/exceptions.phps
        modified:   examples/gmail.phps
        modified:   examples/images/phpmailer.png
        modified:   examples/images/phpmailer_mini.png
        modified:   examples/index.html
        modified:   examples/mail.phps
        modified:   examples/mailing_list.phps
        modified:   examples/pop_before_smtp.phps
        modified:   examples/scripts/shAutoloader.js
        modified:   examples/scripts/shBrushPhp.js
        modified:   examples/scripts/shCore.js
        modified:   examples/scripts/shLegacy.js
        modified:   examples/sendmail.phps
        modified:   examples/smtp.phps
        modified:   examples/smtp_no_auth.phps
        modified:   examples/styles/shCore.css
        modified:   examples/styles/shCoreDefault.css
        modified:   examples/styles/shCoreDjango.css
        modified:   examples/styles/shCoreEclipse.css
        modified:   examples/styles/shCoreEmacs.css
        modified:   examples/styles/shCoreFadeToGrey.css
        modified:   examples/styles/shCoreMDUltra.css
        modified:   examples/styles/shCoreMidnight.css
        modified:   examples/styles/shCoreRDark.css
        modified:   examples/styles/shThemeAppleScript.css
        modified:   examples/styles/shThemeDefault.css
        modified:   examples/styles/shThemeDjango.css
        modified:   examples/styles/shThemeEclipse.css
        modified:   examples/styles/shThemeEmacs.css
        modified:   examples/styles/shThemeFadeToGrey.css
        modified:   examples/styles/shThemeMDUltra.css
        modified:   examples/styles/shThemeMidnight.css
        modified:   examples/styles/shThemeRDark.css
        modified:   examples/styles/shThemeVisualStudio.css
        modified:   examples/styles/wrapping.png
        modified:   extras/EasyPeasyICS.php
        modified:   extras/class.html2text.php
        modified:   extras/htmlfilter.php
        modified:   extras/ntlm_sasl_client.php
        modified:   language/phpmailer.lang-ar.php
        modified:   language/phpmailer.lang-be.php
        modified:   language/phpmailer.lang-br.php
        modified:   language/phpmailer.lang-ca.php
        modified:   language/phpmailer.lang-ch.php
        modified:   language/phpmailer.lang-cz.php
        modified:   language/phpmailer.lang-de.php
        modified:   language/phpmailer.lang-dk.php
        modified:   language/phpmailer.lang-el.php
        modified:   language/phpmailer.lang-eo.php
        modified:   language/phpmailer.lang-es.php
        modified:   language/phpmailer.lang-et.php
        modified:   language/phpmailer.lang-fa.php
        modified:   language/phpmailer.lang-fi.php
        modified:   language/phpmailer.lang-fo.php
        modified:   language/phpmailer.lang-fr.php
        modified:   language/phpmailer.lang-gl.php
        modified:   language/phpmailer.lang-he.php
        modified:   language/phpmailer.lang-hr.php
        modified:   language/phpmailer.lang-hu.php
        modified:   language/phpmailer.lang-it.php
        modified:   language/phpmailer.lang-ja.php
        modified:   language/phpmailer.lang-ka.php
        modified:   language/phpmailer.lang-lt.php
        modified:   language/phpmailer.lang-lv.php
        modified:   language/phpmailer.lang-nl.php
        modified:   language/phpmailer.lang-no.php
        modified:   language/phpmailer.lang-pl.php
        modified:   language/phpmailer.lang-pt.php
        modified:   language/phpmailer.lang-ro.php
        modified:   language/phpmailer.lang-ru.php
        modified:   language/phpmailer.lang-se.php
        modified:   language/phpmailer.lang-sk.php
        modified:   language/phpmailer.lang-sr.php
        modified:   language/phpmailer.lang-tr.php
        modified:   language/phpmailer.lang-uk.php
        modified:   language/phpmailer.lang-vi.php
        modified:   language/phpmailer.lang-zh.php
        modified:   language/phpmailer.lang-zh_cn.php
        modified:   test/bootstrap.php
        modified:   test/phpmailerLangTest.php
        modified:   test/phpmailerTest.php
        modified:   test/test_callback.php
        modified:   test/testbootstrap-dist.php
        modified:   travis.phpunit.xml.dist

no changes added to commit (use "git add" and/or "git commit -a")
[Michael@devserver PHPMailer]$ git diff README.md
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
[Michael@devserver PHPMailer]$ git diff --cached README.md
[Michael@devserver PHPMailer]$ git diff HEAD README.md
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
[Michael@devserver PHPMailer]$ cd ../parsecsv
[Michael@devserver parsecsv]$ git status
HEAD detached at 7e7aeba
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:   ChangeLog.txt
        modified:   License.txt
        modified:   README.md
        modified:   examples/_books.csv
        modified:   examples/basic.php
        modified:   examples/conditions.php
        modified:   examples/download.php
        modified:   examples/limit.php
        modified:   parsecsv.lib.php

no changes added to commit (use "git add" and/or "git commit -a")
[Michael@devserver parsecsv]$ git diff ChangeLog.txt
diff --git a/ChangeLog.txt b/ChangeLog.txt
old mode 100644
new mode 100755
[Michael@devserver parsecsv]$ git diff --cached ChangeLog.txt
[Michael@devserver parsecsv]$ git diff HEAD ChangeLog.txt
diff --git a/ChangeLog.txt b/ChangeLog.txt
old mode 100644
new mode 100755
[Michael@devserver parsecsv]$
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-01-01 17:45:31

如何确定在这些目录中修改了哪些文件,以及更改了哪些文件?

您只需进入其中一个子模块文件夹并执行状态:

代码语言:javascript
复制
cd application/classes_3rd/PHPMailer
git status
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27732982

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档