为什么我看不到git命令的输出?

时间:2016-04-23 22:28:26

标签: git

我安装了 git 。 我创建了一个新的存储库,现在我想在staging中添加一些文件 但是在尝试这样做时我遇到了格式化和空白问题。 我现在需要运行这个命令:

 $ git config --global core.autocrlf true

但按Enter键时没有任何反应。它只是将我返回到我正在尝试运行此命令的目录。根本没有回应我的行为。

当我运行此命令时会出现同样的问题:

$ git add -A

但是当我跑步时:

$ git init

一切正常。

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:5)

没关系,

2命令不会打印任何内容。 : - )

没有关于这些命令的反馈。如您所见,这些命令没有提供反馈。

enter image description here

  • 如果您想验证是否已设置配置值,请检查.git/config
    在您添加--global的情况下,配置文件将位于~/.gitconfig

  • 要验证git add是否有效,请使用git status查看已添加文件的列表。

<强> List of help messages generated by GIT:

您可以使用以下配置打开/关闭它们:

# turn the detached message off
git config --global advice.<one of list below> false
  

<强> advice.*

     

这些变量控制旨在帮助新用户的各种可选帮助消息。所有建议。*变量默认为true,你可以通过将这些设置为false来告诉Git你不需要帮助:

您可以在建议后设置以下任何内容:

git config --global advice.<...>


pushUpdateRejected
    Set this variable to false if you want to disable 
        pushNonFFCurrent,
        pushNonFFMatching, 
        pushAlreadyExists, 
        pushFetchFirst, and 
        pushNeedsForce simultaneously.

pushNonFFCurrent
    Advice shown when git-push(1) fails due to a non-fast-forward update
    to the current branch.

pushNonFFMatching
    Advice shown when you ran git-push(1) and pushed matching refs
    explicitly (i.e. you used :, or specified a refspec that isn’t your
    current branch) and it resulted in a non-fast-forward error.

pushAlreadyExists
    Shown when git-push(1) rejects an update that does not qualify
    for fast-forwarding (e.g., a tag.)

pushFetchFirst
    Shown when git-push(1) rejects an update that tries to overwrite a
    remote ref that points at an object we do not have.

pushNeedsForce
    Shown when git-push(1) rejects an update that tries to overwrite a
    remote ref that points at an object that is not a commit-ish, or make
    the remote ref point at an object that is not a commit-ish.

statusHints
    Show directions on how to proceed from the current state in the output
    of git-status(1), in the template shown when writing commit messages in
    git-commit(1), and in the help message shown by git-checkout(1) when
    switching branch.

statusUoption
    Advise to consider using the -u option to git-status(1) when the command
    takes more than 2 seconds to enumerate untracked files.

commitBeforeMerge
    Advice shown when git-merge(1) refuses to merge to avoid overwriting
    local changes.

resolveConflict
    Advice shown by various commands when conflicts prevent the operation
    from being performed.

implicitIdentity
    Advice on how to set your identity configuration when your information
    is guessed from the system username and domain name.

detachedHead
    Advice shown when you used git-checkout(1) to move to the detach HEAD
    state, to instruct how to create a local branch after the fact.

amWorkDir
    Advice that shows the location of the patch file when git-am(1) fails
    to apply it.

rmHints
    In case of failure in the output of git-rm(1), show directions on
    how to proceed from the current state.