Git changes being lost - why?

后端 未结 9 1782
梦如初夏
梦如初夏 2021-02-13 20:42

Our development team is using git and we\'ve lost changes to files at least twice recently. We are using private Github repos.

In the current case, we can go back throug

9条回答
  •  独厮守ぢ
    2021-02-13 21:39

    While I can't speak to your specific issue, what I can say is that yesterday I experienced something very similar. I had a designer mucking around with some URLs in the code, and updating some images in an iPhone app I was finishing up on, and didn't tell me about it. I pushed my changes I had made which touched on some of these files too (different spots however), and it rejected as non-local fast forward. So I pulled, got conflicts, resolved them and pushed. Problem solved. However, I did undo his code changes in the process.

    One thing I have recently added to my workflow due to a problem very similar to this I experienced yesterday, on a github private repo; is to stash my changes I'm about to commit, pull from the repo, and apply my stash. Should there be conflicts, resolve those, then push.

提交回复
热议问题