michael4180 / WeatherApp

0 stars 0 forks source link

problem with sending pull requests #4

Closed michael4180 closed 6 months ago

michael4180 commented 7 months ago

@bbelderbos I set up git and github with my new project and pushed my commits to github, but I can't seem to create a pull request because main and initial setup have the same commit. I've been working on this for a bit now and can't figure out how to clean up. Need some help..thx

bbelderbos commented 7 months ago

It seems both commits are on both branches no?

https://github.com/michael4180/WeatherApp/commits/main https://github.com/michael4180/WeatherApp/commits/initial_setup/

So could it be that you made the 2 commits while being on main, then you created the initial_setup branch?

That could explain it, or if you merged the branch at some point into main and then pushed both branches.

Can you back track if you indeed pushed both branches up here?

I will review regardless now ...

For the next code, just make a new branch off of main (assuming your local main branch is up2date):

git checkout -b new-branch (or use another name)

do work

git add .

git commit -m "commit message"

git push origin new-branch

Doing this locally from the command line, you should see a link to open a pull request, but you can also do so manually here on github in the 3rd tab of this repo, direct link: https://github.com/michael4180/WeatherApp/pulls

bbelderbos commented 6 months ago

this should work now when you 1. change the default branch (new issue), 2. make a new branch off of main and push it to github -> I think 1. threw us off!