What git gotchas have you been caught by?

后端 未结 9 2084
半阙折子戏
半阙折子戏 2020-12-25 08:51

The worst one I\'ve been caught by was with git submodules. I had a submodule for a project on github. The project was unmaintained, and I wanted to submit patches, but co

9条回答
  •  长发绾君心
    2020-12-25 09:47

    Work work work ...

    git commit
    

    Work work work ...

    git commit
    

    Hm... time to integrate

    git rebase -i origin/master
    

    What? Conflicts? Let's start again

    git reset --hard origin/master
    

    Cry cry cry...


    Git lets you wipe your local history without remorse. The biggest gotcha is that you are the safety net.

提交回复
热议问题