I’ve finished a web project yesterday (for a practice), and today when I want to deploy it to Github Pages, I see that the web looks so terrible.

Then I realized that many lines of the code are disappeared, e.g. all of the codes I wrote for responsiveness are gone, which I’m 100% sure I wrote them a few days ago.

All of my practice codes are stored in a private git repo, include this one. And then I was committing the repo while I made some changes in another folder (they’re all in the same repo). After commit and push, my changes in the project are gone.

This is an example of my case. Firstly, the code looks like this.

&__button {
        background-color: color-white;         height: 7rem;         width: 7rem;         position: fixed;         top: 6rem;         right: 6rem;         border-radius: 50%;         z-index: 2000;         box-shadow: 0 1rem 3rem rgba(color-black, .1);
        text-align: center;
        cursor: pointer;

        @include respond(tab-port) {
            top: 4rem;
            right: 4rem;

        @include respond(phone) {
            top: 3rem;
            right: 3rem;

and after commit, the

mixins are gone

&__button {
        background-color: $color-white;
        width: 7rem;
        height: 7rem;
        border-radius: 50%;
        position: fixed;
        top: 6rem;
        right: 6rem;
        z-index: 102;

How is that even possible? I use git to be a backup of my code but now my code is gone because of it? I have no idea what’s going on.

I’m totally new in this field, so any response will be highly appreciated! 😊

Thanks in advance.

Anonymous Asked question May 13, 2021