我从另一个分支切换,因此可以进行推送。签出时,文件在我的编辑器中打开,这可能导致权限被拒绝错误。git是否丢失了我的所有文件?我不知道如何让他们回来。这是我的工作-文件丢失了,
js/Messages目录
templates/Messages目录这些是在我执行git操作时在编辑器中打开的
C:\Users\***\Documents\myproject>git pull
Password for 'https://********@bitbucket.org':
Already up-to-date.
C:\Users\***\Documents\myproject>git checkout paymentmodule
error: cannot stat 'www/js/Messages': Permission denied
error: cannot stat 'www/js/Messages': Permission denied
error: cannot stat 'www/templates/Messages': Permission denied
C:\Users\***\Documents\myproject>git checkout paymentmodule
Switched to branch 'paymentmodule'
C:\Users\***\Documents\myproject>git push origin paymentmodule
Password for 'https://******@bitbucket.org':
To https://*******@bitbucket.org/********/myproject.git
! [rejected] paymentmodule -> paymentmodule (non-fast-forward)
error: failed to push some refs to 'https://********@bitbucket.org/********/myproject.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. …Run Code Online (Sandbox Code Playgroud)