fork repository remote and local how to manage after merge #147142
-
Select Topic AreaGeneral Bodyin local i fork repository clone using git clone which i in my got account. Now i create a pull request to origin repo creator and he merged my changes now from my github i delete the forged repository and in local i want the origin repository ? is there any other command i don't want this way like delete this local code and go original repo clone from there you get original i |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Unfortunately, there's no direct command to "switch" a local repository to a different remote origin. Here's the most straightforward approach: Delete the Forged Repository: Remove the local directory: Use your file explorer to delete the entire directory of the forged repository. Open your terminal: Navigate to the desired directory where you want the new clone. git clone https://github.com/original_owner/original_repo.git |
Beta Was this translation helpful? Give feedback.
-
Thanks for posting in the GitHub Community, @Shaddycracker! We're happy you're here. You are more likely to get a useful response if you are posting your question in the applicable category, the Discussions category is solely related to conversations around the GitHub product Discussions. This question should be in the Programming Help category. I've gone ahead and moved it for you. Good luck! |
Beta Was this translation helpful? Give feedback.
Unfortunately, there's no direct command to "switch" a local repository to a different remote origin.
Here's the most straightforward approach:
Delete the Forged Repository:
Remove the local directory: Use your file explorer to delete the entire directory of the forged repository.
Remove the Git configuration: If you've made any custom configurations, you can remove them using Git commands. However, a simple directory deletion is often sufficient.
Clone the Original Repository:
Open your terminal: Navigate to the desired directory where you want the new clone.
Use the git clone command: Execute the following command, replacing https://github.com/original_owner/original_repo.git with the a…