我对文件进行了一些更改并提交了它们。然后我结帐到一个较旧的分支。
之后我发现我所做的所有更改都消失了,我所做的提交也消失了。
如何找到我所做的所有更改?
编辑
这是从我的终端历史记录中复制的:
$ git commit -m 'done clean FNAG Yishu'
[detached HEAD 8a67a04] done clean FNAG Yishu
3 files changed, 1121 insertions(+)
create mode 100644 data/data_afterClean/amazon_Revised.txt
create mode 100644 data/data_afterClean/epinions_Revised.txt
create mode 100644 data/data_afterClean/slideshare_Revised.txt
但是当我尝试时会发生错误push
:
$ git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
To https://github.com/xxx/xxx.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/xxx/xxx.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. If you did not intend to push that branch, you may want to
hint: specify branches to push or set the 'push.default' configuration variable
hint: to 'simple', 'current' or 'upstream' to push only the current branch.