标签: git-status

在尝试执行git-commit或git-status时如何修复"总线错误"

我在OS X服务器上有一个git存储库,以前工作正常.我能够添加文件,提交它们,并将内容提取到我的笔记本电脑.

现在,当我进入服务器并执行git commitgit status在存储库中时,我在命令行中看到的只是bus error.

git log 仍然可以正常工作,并给我通常的输出.

我猜的东西是错误与资源库,因为在同一服务器上其他回购git commitgit status做仍然可以工作.

我该如何调试/修复此问题?

更新:我在问题发生之前重新创建了我上次创建的目录.这让我再做git status一次!

git commit -a但是,在此之后直接运行会出现以下错误:

fatal: Unable to create '/path/to/repo/.git/index.lock': File exists.

If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
Run Code Online (Sandbox Code Playgroud)

然后我手动删除了index.lock文件,现在问题解决了..

我不知道出了什么问题.有任何想法吗..?

git macos bus-error git-commit git-status

7
推荐指数
1
解决办法
6277
查看次数

让git知道文件已重命名 - 将OS X文件从小写重命名为大写显示为未跟踪

我重命名了一个文件夹,没有使用git mv或任何其他git命令,从小写到大写,现在git显示新文件夹没有跟踪,同时跟踪文件夹内的文件.

我将"Jogo do rato"更名为"Jogo do Rato"而不是制作一个git add --all.Git发现了新的文件和更改,但它现在显示"Jogo do Rato"中的每个文件夹都没有跟踪.我想摆脱这个"未跟踪"的文件,但是我想要走的路要走.

我正在使用OS X Snow Leopard,我的驱动器是Mac OS Extended(Journaled),不区分大小写,git版本1.6.6.

问候,

塞尔吉奥

file git-status

7
推荐指数
1
解决办法
1128
查看次数

git显示修改文件但我没有改变任何git reset不起作用

我克隆存储库切换到我的分支,当我打印git状态我看到修改文件,我尝试做git reset - 硬但是没有效果:((

git status
On branch release

Changes not staged for commit:

    modified:   htdocs/fonts/OfficinaSansBoldC.eot
    modified:   htdocs/fonts/OfficinaSansBoldC.svg
    modified:   htdocs/fonts/OfficinaSansBoldC.ttf
    modified:   htdocs/fonts/OfficinaSansBoldC.woff
    modified:   htdocs/fonts/OfficinaSansC-Book.eot
    modified:   htdocs/fonts/OfficinaSansC-Book.svg
    modified:   htdocs/fonts/OfficinaSansC-Book.ttf
    modified:   htdocs/fonts/OfficinaSansC-Book.woff

no changes added to commit 

git reset --hard origin/release

git status
On branch release

Changes not staged for commit

    modified:   htdocs/fonts/officinasansboldc.eot
    modified:   htdocs/fonts/officinasansboldc.svg
    modified:   htdocs/fonts/officinasansboldc.ttf
    modified:   htdocs/fonts/officinasansboldc.woff
    modified:   htdocs/fonts/officinasansc-book.eot
    modified:   htdocs/fonts/officinasansc-book.svg
    modified:   htdocs/fonts/officinasansc-book.ttf
    modified:   htdocs/fonts/officinasansc-book.woff

no changes added to commit 
Run Code Online (Sandbox Code Playgroud)

git line-endings git-status

7
推荐指数
1
解决办法
2688
查看次数

为什么"git status"显示太多未跟踪的文件?

在底部回答.

我试图statusgit_test2目录中看到我的文件,其中包含3个名为的文件test1.txt,test2.txttest3.txt.

这是我输入终端的内容:

cd Desktop
cd git_test2
git status
Run Code Online (Sandbox Code Playgroud)

git status命令之前一切都很好.它应该只显示3个未跟踪的文件,但我从终端获取此文本:

On branch master

Initial commit

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)

new file:   ../../AndroidStudioProjects/Sunshine/app/src/main/res/layout/list_item_forecast.xml
new file:   ../../Library/Preferences/AndroidStudio1.2/options/fileEditorProviderManager.xml
new file:   ../../Library/Preferences/AndroidStudio1.2/options/git.xml
new file:   ../../Library/Preferences/AndroidStudio1.2/options/other.xml
new file:   ../../Library/Preferences/AndroidStudio1.2/options/runner.layout.xml

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) …
Run Code Online (Sandbox Code Playgroud)

git git-status

7
推荐指数
1
解决办法
3815
查看次数

如何在不输入完整路径的情况下运行'git diff some/long/file/name'?

在我的工作流程中,我经常运行以下一对命令:

$ git status
M README.txt
M some/long/file/name
$ git diff some/long/file/name
Run Code Online (Sandbox Code Playgroud)

有没有办法,快速输入/ use_shortcat为长文件名而不复制它的名称(这个动作需要使用鼠标,它不像打字那么快)?也许是这样的git diff $2,$2从状态列表中第二个改变文件的位置......?

git git-diff command-line-interface git-status

7
推荐指数
3
解决办法
725
查看次数

Git状态-当我执行'git status'命令时如何排除不需要的文件夹内容以显示

我试图避免在执行“ git status”命令时显示不需要的文件夹内容(例如:.settings,.metadata等)。我在添加文件夹名称之后修改了.gitignore文件,但是当我执行git status时,仍然得到所有这些文件。

请帮我。

git gitignore git-status

7
推荐指数
5
解决办法
3772
查看次数

编辑并提交到本地仓库后,Git Status不会显示"超前"

我们公司的工作流程是在我们处理新功能时将主分支克隆到_Test分支,并且我们不断推送/共享此_Test分支,直到客户完成并批准一组功能,然后我们合并到主分支并构建和发布我们的站点.然后冲洗并重复.

我遇到的问题是git状态在_Test分支上工作时没有显示正确的前进/后退(或者更可能,我可能不理解它应该显示的内容).如果我执行以下步骤:

  1. git checkout _Test
  2. git pull --rebase origin _Test#获取最新代码
  3. 编辑一些文件
  4. 得到提交-am"测试提交"
  5. git状态

在第四步之后,git输出是

[_Test d6fa824] Test commit
1 file changed, 1 insertion(+), 1 deletion(-)
Run Code Online (Sandbox Code Playgroud)

然后在第五步之后,git输出

# On branch _Test
nothing to commit, working directory clean
Run Code Online (Sandbox Code Playgroud)

不应该说吗?

Your branch is ahead of 'origin/_Test' by 1 commit.
Run Code Online (Sandbox Code Playgroud)

如果我查看qgit或gitk,它们分别(正确地)显示origin/_Test和remotes/origin/_Test,在最后一次测试提交后提交1次.我正在运行msysgit和git版本输出:

git version 1.8.1.mysysgit.1
Run Code Online (Sandbox Code Playgroud)

所以我很困惑为什么git commit的输出没有声明我超前于origin/_Test(显然我是因为我刚刚提交)以及为什么git status不会声明相同的信息.

如果我需要提供更多信息,请告诉我.

git-status

6
推荐指数
1
解决办法
1532
查看次数

为什么Git会忽略这些文件夹?

我在Git下添加了一个Laravel应用程序,以便我可以推送到Bitbucket.在根文件夹上,我运行git add -A并推送远程服务器.我检查过它没有发送所有文件夹; 例如,它根本没有添加vendor文件夹.如何确保添加所有子文件夹?当我跑步时git status,它说:

# On branch master
nothing to commit, working directory clean
Run Code Online (Sandbox Code Playgroud)

更新

我跑了git status --ignore,发现列出了以下文件:

stocktrack/app/storage/logs/laravel.log
stocktrack/app/storage/meta/services.json
stocktrack/app/storage/sessions/cdf664ccf42d040bc92d76418f736cc78e20d77a
stocktrack/app/storage/views/81774cd762e1fa0174ad42e0b0d53196
stocktrack/bootstrap/compiled.php
stocktrack/composer.lock
stocktrack/vendor/
Run Code Online (Sandbox Code Playgroud)

.gitignore,我只补充说.idea.为什么忽略其他人呢?

git git-status

6
推荐指数
2
解决办法
1818
查看次数

如何列出所有未更改(跟踪)的文件?

我将一个较旧的"git-image"解压缩到我的git存储库中,大部分文件都已更改.我想知道哪些文件保持不变.如何列出这些文件?

git git-status

6
推荐指数
1
解决办法
380
查看次数

使 `git status` 忽略空白更改

git status告诉我,很少有文件被修改。但是当我使用git diff下面的任何参数执行时,它都是空的。

   --ignore-space-at-eol
       Ignore changes in whitespace at EOL.

   -b, --ignore-space-change
       Ignore changes in amount of whitespace. This ignores whitespace at line end, and considers all other sequences of one or more whitespace characters to be equivalent.

   -w, --ignore-all-space
       Ignore whitespace when comparing lines. This ignores differences even if one line has whitespace where the other line has none.
Run Code Online (Sandbox Code Playgroud)

我尝试git checkout .重置此更改,但没有帮助。我怎样才能将此文件回滚到原始状态(这样它们就不会再被“修改”)或git status永久忽略空白更改?

git reset --hard也不工作。

git whitespace git-status removing-whitespace

5
推荐指数
1
解决办法
4754
查看次数