git add -up期间不同选项的完整形式是什么

时间:2014-03-11 10:01:23

标签: git version-control

分阶段[y,n,q,a,d,/,s,e,?]?

我只是 - 是的,n - 不,q - 退出 还有什么?

我可以将特定的Hunk(工作目录)重置为上次提交的版本吗?

2 个答案:

答案 0 :(得分:0)

你走了:

       y : stage this hunk
       n : do not stage this hunk
       q : quit; do not stage this hunk nor any of the remaining ones
       a : stage this hunk and all later hunks in the file
       d : do not stage this hunk nor any of the later hunks in the file
       g : select a hunk to go to
       / : search for a hunk matching the given regex
       j : leave this hunk undecided, see next undecided hunk
       J : leave this hunk undecided, see next hunk
       k : leave this hunk undecided, see previous undecided hunk
       K : leave this hunk undecided, see previous hunk
       s : split the current hunk into smaller hunks
       e : manually edit the current hunk
       ? : print help

你可以一直陪伴吗?寻求帮助。

答案 1 :(得分:0)

使用?获取所有符号的含义。

您可以使用git checkout -p

将特定的大块重置为上次提交的版本

仅仅是一个FYI,git reset也需要一个-p,以防你想要通过大块头来展示大块头。