Codecademy Mixed Messages Project: Nonsensical Jokes generator with prefix and suffix text

  • The actual coding was easy, but working with git and GitHub was a bit challenging.
  • It took me 2 hours
  • Here’s a link to the GitHub repo.

I have one question. When I pushed commits from my local branch to the remote repository it didn’t open up a pull request on GitHub and let me merge the changes on there. I did the process of creating an issue on GitHub, then working on my local repo to fix/update code according to the issue, then push the commits from my local repo to the remote repo on GitHub. But that doesn’t involve a pull request on GitHub. It just updates the remote repository with all the commits I made on my local repository. How do I do this properly? If you want to just link me to the appropriate video that we went through in the course, then that’s fine. I was going to retake those anyway and a link to the appropriate video would quicken my learning process. ps. I was able to work with branches on my local repo just fine. I think I get the concept, but just don’t know how to do it properly on GitHub.

Hello megaslick23.

I am not sure if I understood you correctly. I But here is my solution:
In your local repository, you have access to all the branches you have in github.
Your local repository is not a new branch. When you push changes from your local repo to github, you are telling github to which branch push those changes:
git push -u origin (name of the branch)
Here you have a very useful link to understand git branch’s commands: Git Branches: List, Create, Switch to, Merge, Push, & Delete
I would advise you to check your current brands in your local repo:
git status (to see in which branch you are right now)
git branch (to see your local branches)
If you only have your main branch(as I think you do), you need to create a new branch and after that, you will be able to pull requests to merge that branch.
In that link you will find all the necessary commands to deal with your problem regarding branches.

If you are working correctly with branches on your local repo, then forget all of the above. Just remember that the command push selects to which branch you push the changes, and the pull request, If you are doing that right, here you have a link about the pull request: Git - git-request-pull Documentation you can pull a request from github.com too.

I hope it’s helpful, good luck.

1 Like

Slick response @ed_wf ,

I knew when I wrote my explanation it was going to be hard to understand, but you killed it. I did a bunch of practice runs with the info you provided. I now know you have to create a branch locally, switch to the branch, make your edits, add/commit, then push them to the remote repo and that will create a pull request on that remote repo. I also learned a bunch of other things, but I’ll leave that out of this post. I have a feeling git is not something you learn in one sitting, but I think I’ve reached the point where I can contribute to a project.

I bookmarked your link. I really appreciate the help. Hopefully I can pay it forward in the future.

1 Like

I’m glad it was helpful

1 Like