小编S. *_*els的帖子

如何在Windows上打印出git配置设置(core.autocrlf)的值?

我正在尝试修复Windows上的CRLF问题.

如何查看core.autocrlf系统上配置设置的值是什么?

git newline

36
推荐指数
3
解决办法
2万
查看次数

Git用CRLF替换了我所有的LF - 我该如何解决这个问题?

我跑了一个

git add -A
Run Code Online (Sandbox Code Playgroud)

在我的第一个git项目上.

我收到了大约一千条回复:

"警告:LF将被CRLF取代"

因为它经历了每个文件(Ruby文件,有些是宝石).

我删除了我的.git目录并尝试通过键入以下命令禁用此默认设置:

git config core.autocrlf false
Run Code Online (Sandbox Code Playgroud)

然后我尝试再次添加文件:

git add -A
Run Code Online (Sandbox Code Playgroud)

但我得到了同样的结果.救命!

ruby git rubygems newline

14
推荐指数
1
解决办法
1万
查看次数

为什么"git push helloworld + master:master"而不仅仅是"git push helloworld"?

我最初尝试推送我的(第一次!)git repo:

$ git push helloworld
Run Code Online (Sandbox Code Playgroud)

但我得到了回报:

To git-smichaels@free5.projectlocker.com:helloworld.git
 ! [rejected]        HEAD -> master (non-fast forward) error:
 failed to push some refs to 'git-smichaels@free5.projectlocker.com:helloworld
git'
Run Code Online (Sandbox Code Playgroud)

所以我找到了另一个关于"修改提交"的StackOverflow问题,并从那里尝试了一个建议而不知道它是否会对我有所帮助:

KaiserSosa@SMICHAELS /c/test/helloworld (master)
$ git push helloworld +master:master
Run Code Online (Sandbox Code Playgroud)

有效!

但我不知道为什么它解决了我的问题:(

有人可以解释为什么这有效,但" git push helloworld"不是吗?

git git-push

9
推荐指数
1
解决办法
2万
查看次数

在Windows上为git设置全局配置选项时,它将在何处写入?

如果你在Windows上设置这样的东西:

git config --global core.autocrlf false
Run Code Online (Sandbox Code Playgroud)

这个全局设置写在哪里?

git configuration newline global

8
推荐指数
1
解决办法
7246
查看次数

"git push"失败:"你没有指定任何refspecs推"

我在projectlocker上设置了一个git项目来推送我的git文件.然后我进入了初始化git项目并暂存我的文件的目录.最后我尝试使用此命令将项目推送到projectlocker:

$ git push git-smichaels@free5.projectlocker.com:helloworld.git
Run Code Online (Sandbox Code Playgroud)

它会生成此错误:

warning: You did not specify any refspecs to push, and the current remote
warning: has not configured any push refspecs. The default action in this
warning: case is to push all matching refspecs, that is, all branches
warning: that exist both locally and remotely will be updated.  This may
warning: not necessarily be what you want to happen.
warning:
warning: You can specify what action you want to take in this case, and
warning: …
Run Code Online (Sandbox Code Playgroud)

git git-push

2
推荐指数
1
解决办法
6949
查看次数

标签 统计

git ×5

newline ×3

git-push ×2

configuration ×1

global ×1

ruby ×1

rubygems ×1