开发者

Github losing revisions?

开发者 https://www.devze.com 2023-03-02 05:12 出处:网络
I work for a small web dev company and we are using private repository in github to keep our code. The way our workflow is organized is that each dev would work on a local repository and do frequent c

I work for a small web dev company and we are using private repository in github to keep our code. The way our workflow is organized is that each dev would work on a local repository and do frequent commits, but only push changes to github when the code is working. When a feature/change/fix is ready for production we use git pull on production servers to pull changes off of github. Just a few minutes ago we found that github is 56 revisions old, compared to production servers. At first, we thought that one of us has merged his work directly on production instead of doing a merge locally and pu开发者_Go百科shing the result to github, but logs and command history on production boxes seem to indicate that only pull command was used. What could happen to cause github to completely lose 56 revisions?


Does anyone on your team use git push -f as part of their workflow?

My best guess is that someone is force-pushing and didn't pull in someone's commits. It's extremely difficult to lose data using Git without force pushing, but if you're force pushing without knowing the consequences, it's easy to think someone is "losing" data when it's actually yourself deleting it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号