English 中文(简体)
如何重新采用优惠?
原标题:How to apply a git revert?

Im在高频部署服务器上工作。 我不得不重新唤醒我的当地头脑,现在试图把服务器带回yn。 我发现这一错误。

! [rejected] master -> master (non-fast-forward) error: failed to push some refs to server 
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g.  git pull ) before pushing again.  See the
 Note about fast-forwards  section of  git push --help  for details.

当我拉回这段话时,我就在回来之前回当地回来了。

感谢!

最佳回答

(看你是否不仅重回了几处修订,而且还在当地制造了新的承诺,否则,错误只是“迄今为止”或类似。) 您可使用<条码>git fetch origin,然后<条码>gitk-all。

If you re sure that you want to just discard the extra commits on the deploy server s master, you can do a force push with:

 git push --force origin master

Force pushing usually means that you re rewriting history in a way that may be problematic for any collaborators on the project, but I assume that since this is just a server that you push to in order to deploy, it s not one that people are cloning from. However, if my assumption is wrong, you should rethink this.

问题回答

暂无回答




相关问题
Tracking Versions, Builds, Revisions, with TortiseSVN

I am the sole developer on a project and have been using tortoiseSVN for quite a while. Now Id like to start getting version information working correctly in the project I.E. show Major Version, Minor ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

How to handle different csproj [closed]

I am working in a team of five. We are working on a C# application with five csprojects. The problem is that for each csproject, each of my colleagues has their own ideas on how to reference a DLL; ...

Changing username in SVN+SSH URI on the fly in working copy

I am using SVN+SSH to check out a working copy of repository from an SVN server on which all developers are members of a developer group and have full read/write permissions on the repository ...

How to search for file in subversion server?

Is there a way to search for a file in a subversion repository? Something similar to Unix find command, with which I can find the location of a file in a repository. I know there is svn list, but ...

热门标签