Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

This branch is 6 commits ahead of Codecademy:main #1431

Answered by yangc95
yangc95 asked this question in Q&A
Discussion options

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

You must be logged in to vote

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

Comment options

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

You must be logged in to vote
1 reply
Comment options

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

Answer selected by yangc95
Comment options

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.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /