Search code examples
gitgithubrepositorygit-clone

How to ignore git clone?


I had a repository. I rolled back to the old commit. Now push a new one. And I get this message.

On the master branch Your branch is 10 commits behind “origin / master” and can be rewind ahead. (use "git pull" to update your local branch) nothing to commit, no changes in the working directory

How can I ignore it? Or how to just delete these 10 commits?


Solution

  • if you did a git reset --hard on a local branch and now you want the remote branch to look like you did the same on it, you should your push --force it onto the remote

    git push --force some-remote the-branch