【问题标题】:git commit - unstage ; what to do?混帐提交 - 取消阶段;该怎么办?
【发布时间】:2021-05-11 01:03:00
【问题描述】:

我在 open wrt 中做了那个补丁,我使用 patch -p 1 -i filename.patch + git add filename.patch 应用了补丁,但是当我检查状态时,我明白了,我需要做其他事情吗? 谢谢


/openwrt$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    new file:   target/linux/mvebu/patches-5.4/800-Add_Armada_38x_support_for_clk-cpu.patch

【问题讨论】:

    标签: git commit patch openwrt


    【解决方案1】:

    索引中列出的新内容可以提交或重置。 to be committed 是为了提醒您,您已经 added 对 repo 进行了快照,但尚未将它们放入提交中,下一行是提醒您也可以在编写提交之前将它们退出。 addreset(和 checkout)也有 -p/--patch 选项,你可以零碎地做事情,Git 有“任何对你的工作有用”的东西,所以很难人们会有点迷失.

    【讨论】:

    • 非常感谢,所以可以肯定的是,在我这样做之后; applied patch + git add 当我做git status 时,我在终端中看到我的补丁是绿色的,所以文件在内核(openwrt)中,如果我“制作我的图像”它会在那里?因为我看到你评论:to the repo but haven't baked them in to a commit yet。我不知道如何提交,我以为是当我执行“git add”时......谢谢
    • 你需要花更多的时间在 git 文档上。说git help 并跟随弹跳球,git help -g 特别列出了当您试图围绕每个指南的主题时获得定向的好方法。
    猜你喜欢
    • 2011-06-30
    • 1970-01-01
    • 2015-02-28
    • 1970-01-01
    • 1970-01-01
    • 2017-04-10
    • 2011-06-06
    • 2011-11-15
    • 2012-06-27
    相关资源
    最近更新 更多