What is the process for working on the practice project and submitting a PR
Closed this issue · 5 comments
The old instructions for working on the practice project are no longer on the repo. When I tried to submit a PR my branch was not found. I think this is because I checked out the code and created a branch, but I never pushed the changes. I have completed the project. Can I push the changes to see my branch and submit my PR. I'm confused about the process and I don't want to mess up the repo if I push. I'm not sure what to do.
@rramirez-dev Hi!
You can find the instructions for the practice project here:
https://github.com/raywenderlich/ios-interview/tree/master/Practical%20Example
I'm not sure what specifically went wrong with the PR process. You need to push the changes to your repo and then submit a PR. GitHub has fairly detailed instructions on how to submit a PR here:
https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request
If that doesn't help feel free to reach out with more detailed info.
After watching some YouTube videos about making a pull request on GitHub, I think I know what I did wrong. I did not fork the repository before cloning it. Now I have a completed project on a cloned repo.I need to fork the repository, create my branch, and then move my completed project and git history to the new branch, if that is possible? I don't know if I can move my git history.
@rramirez-dev here's what you can do. Basically you need to fork this repository, and then change your local repo to point to that fork.
- Fork this repository. You'll get a new repo on your account.
- Navigate to the existing repo on your machine.
- Type
git remote remove origin
to remove your current remote. - Type
git remote add origin <new forked repo url>
to make your new fork the origin.
Then make a git push and proceed with the PR normally.
I got the following error when I pushed.
fatal: The current branch rramirez-dev_ios_interview_project has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin rramirez-dev_ios_interview_project
I executed the command (git push --set-upstream origin rramirez-dev_ios_interview_project) and the fork was created successfully.