ubsuny / CP1-24-HW2

Homework2 template for CP1-24
1 stars 15 forks source link

Pull request from fork repository to main one #73

Open Cosmos491 opened 1 month ago

Cosmos491 commented 1 month ago

Hi all, I need some guidance regarding what to do after completing the homework assignment 2, as in I have written the code and the documentation. Now I want to create a pull request but I am not sure if I am correctly doing so as it is not showing on the main branch. Can someone help me on this?

iglesias-cardinale commented 1 month ago

Did you write your code in a codespace on your forked repository?

Cosmos491 commented 1 month ago

I wrote the code in codespace, and the documentation in my forked repository.

iglesias-cardinale commented 1 month ago

Then there should be an option in your repository to create a pull request. Once you click on "create pull request" you should be able to click the branch you want to pull from.

I might recommend that you split your work into multiple branches and do multiple pull requests so that you can keep track of everything, make sure your reviewer doesn't have so much to review, and get more homework points.

Cosmos491 commented 1 month ago

Ohh, I see. On my branch, it also asks me to update my branch, or discard commits. Should I update it and then click on the pull request? Something like this:

Screenshot 2024-10-06 at 8 27 32 PM
iglesias-cardinale commented 1 month ago

Yes, you should sync your fork before you do your pull request. It'll just make sure your branch is up to date with the main repository.

Cosmos491 commented 1 month ago

Thanks Vince, I really appreciate your help on this. Can you also tell me how to push and pull from codespace

Screenshot 2024-10-06 at 9 17 16 PM

I am guessing I should sync it first, then do the push request, and then the pull request?

-Vedant

ojha-aditya commented 1 month ago

Sync would do it for you, push changes to the branch on which your codespace is set up and pull the changes done on the main repository by someone to the same. After committing your codespace changes and syncing, it would be possible to create a pull request from here to the main repository.