按照以前我刚开始学git那会, 一直都是手动改代码, 手动还原, 等commit以后再还原回去, 非常的麻烦
小技巧 git add -p
1 2 3 4 5 6 7 8 9 10 11 | y - stage this hunk n - do not stage this hunk q - quit; do not stage this hunk or any of the remaining ones a - stage this hunk and all later hunks in the file d - do not stage this hunk or 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 e - manually edit the current hunk ? - print help |
输入对应的字母就可以了
0 comments:
Post a Comment