That TDD Fellow | Tech Blog | Screencasts

Let’s stop fearing our own creations and start being in control of them. Let’s be professional.

How to Commit Only Parts of Modified Files Using Git

| Comments

  • git add -i交互式命令 把需要提交的文件勾上,使用update选项
  • git stash 将其余文件放入暂存区
  • git commit -m ’提交’
  • git rebase (git svn rebase 如使用svn)
  • git push (git svn dcommit 如使用svn)

    做完之后,需将之前暂存的部分取出来了: git stash apply