admin管理员组文章数量:1289508
After I used all the commands
git add .
git commit -m "tracker project"
git remote add origin .git
git branch -b
git branch -a
git branch -m main
git branch main
git pull
git fetch
git push origin main
git push origin main -f
I accidentally delete all my files in my repository and cannot find any commit history there in my main branch.
However, when I navigate to Actions section I find the action from yesterday and it has all my previous work there. So what should I do to revert my work to the main branch.
Sorry for any confusion, I'm still learning new concepts.
I tried to use git reflog
but it doesn't show any history. Therefore I cannot reset the commit.
After I used all the commands
git add .
git commit -m "tracker project"
git remote add origin https://github/pqd.git
git branch -b
git branch -a
git branch -m main
git branch main
git pull
git fetch
git push origin main
git push origin main -f
I accidentally delete all my files in my repository and cannot find any commit history there in my main branch.
However, when I navigate to Actions section I find the action from yesterday and it has all my previous work there. So what should I do to revert my work to the main branch.
Sorry for any confusion, I'm still learning new concepts.
I tried to use git reflog
but it doesn't show any history. Therefore I cannot reset the commit.
1 Answer
Reset to default 0Just click “Download zip” on this commit, manually re-add the files to a repository and push it
本文标签:
版权声明:本文标题:git - This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository - Stack O 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741425627a2378059.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论