git commit frequency

前端 未结 11 1760
后悔当初
后悔当初 2020-11-29 21:06

Since i switched to git from svn i started make more commits every time i recompile and my tests pass i commit my work. In the end i end up committing function by function.<

11条回答
  •  抹茶落季
    2020-11-29 21:34

    I commit pretty far apart. git isn't meant to "backup" your code, you should be using tarballs or dropbox or something to ensure you don't lose code.

    If you don't commit very often you can better tell exactly what should go in what commit and it gives you a smoother history than 50 commits with

    "oops", "damn", "forgot that file"

    you can rebase, but if you never stage/commit in the first place, theres no need to undo your work

提交回复
热议问题