-
Notifications
You must be signed in to change notification settings - Fork 4.2k
-
In efforts to continue the discussion about getting the forked main branch up to date with the upstream repo's main branch.
Continuation from: #1269 (comment)
@ericsonrd
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 2
Run these on cc-docs-fork (Before running these, I'd recommend making sure that this branch does not contain anything you need to save. I assume there is nothing needed here since rn_components has all the changes needed in your case):
git fetch upstream
git merge upstream/main
git reset --hard upstream/main
git push origin HEAD:main --force
Replies: 2 comments 1 reply
-
Screen Shot 2023年01月03日 at 9 14 41 PM
Run these on cc-docs-fork (Before running these, I'd recommend making sure that this branch does not contain anything you need to save. I assume there is nothing needed here since rn_components has all the changes needed in your case):
git fetch upstream
git merge upstream/main
git reset --hard upstream/main
Screen Shot 2023年01月03日 at 9 17 38 PM
git push origin HEAD:main --force
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi @yangc95 Thanks. I've added you as collaborator to the branch.
Thanks for this solution, It seems completely synced now. What are the next steps?
Screenshot 2023年01月04日 at 1 47 45 AM
Beta Was this translation helpful? Give feedback.
All reactions
-
🎉 4
-
I can suggest one more thing suppose you do some changes on the main branch mistakenly which I did like 3 4 days ago too. You can go to git are write git log there you will the commits you did on main main just copy the hash code on the commit which is just below the wrong commits and run the command git rest hashcode this will unstage the changed files which you did on the main branch now simply go to the file destination and run the command git rm -f filename and delete that file.
Now all the changes will gone from your main and it will be even with the forked main branch. Hope this can help you in future.
@yangc95 I did this same mistake 4 days before and followed the above mistakes to fix it.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 4