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.

Share Improve this question edited Feb 21 at 23:57 dthorbur 1,0913 gold badges13 silver badges26 bronze badges asked Feb 20 at 15:25 Dat PhiDat Phi 112 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Just click “Download zip” on this commit, manually re-add the files to a repository and push it

本文标签: