禁用git staging区域 [英] Disable git staging area

查看:203
本文介绍了禁用git staging区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的不喜欢git staging区,它只是使我的生活不必要的混乱。

I really don't like the git staging area, it just makes my life unnecessarily confusing.

可以禁用它,使所有编辑和新文件是在一个单一的上下文?所以git diff显示存储库和我的工作目录之间的差异(我不必也键入git diff --cached),所以git ci检查我的整个工作副本(不只是暂存的部分)。

Is it possible to disable it so that all edited and new files are in a single context? So that git diff shows the diff between the repository and my working directory (and I don't have to also type git diff --cached) and so that git ci checks in my whole working copy (not just the part that's staged).

如果没有,替代方案(如设置配置),以便看起来我没有一个分期是很好的。

If not, alternatives (like setting up cofigurations) so that it appears that I don't have a staging are would be great too.

我没有选择改变到不同的DVCS,我不想学习喜欢暂存区。请不要发布建议这些:(

I do not have the option of changing to a different DVCS and I don't want to learn to like the staging area. Please do not post to suggest these :(

感谢,
-Shawn

Thanks, -Shawn

PS:I在superuser.com上提出了此问题, http://superuser.com/questions/192022/disable-git-staging -area ,但是这个论坛似乎有更少的发布(只有118标记git相比4448这里)

PS: I asked this on superuser.com, http://superuser.com/questions/192022/disable-git-staging-area, but that forum seems to have much less posted (only 118 tagged git compared to 4448 here)

推荐答案

更严谨的是, git add -A; git commit

git add -A

git add -A is more powerful than the usual git commit -a. It will find new files as well as staging modified content and removing files that are no longer in the working tree.

这篇关于禁用git staging区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆