Beginner questions about branches and updating

Sorry these are really basic questions but I’m completely bamboozled …

I’ve created my own repository of a project and created a branch to update one feature. I figured out how to create a pull request for that. My changes were adopted. Success!

Problem 1 - I’ve now started on another feature but my repository is 10 days out of date. How do I update my copy of the repository? There is a message saying the files are out of date but no obvious way to update to the latest files. I thought I’d create a new fork but that’s not possible.

Problem 2 - I created another feature change in a second branch but the others on the project are saying this branch isn’t public so they can’t see my suggestions. I can’t see any option to make the branch public. There is a help file saying I should be able to change visibility but I don’t get visibility options when I click on settings.

I have tried using in both Github desktop and web.

You’ll need to pull the updates from the upstream repository locally, and then push them to the right branch on your fork. I’m not sure how to do it in GitHub Desktop, in the console it’s something like this (assuming the default branch is called main, and you haven’t modified it):

git checkout main
git remote add upstream <URL>
git pull upstream main
git push origin main

See also: Git - Working with Remotes

There is no per-branch visibility on GitHub, either your repository is public or it is not. Maybe you haven’t pushed the branch to your GitHub repository yet?

Thanks.

I think I’ve figured it. I need to generate a pull from the project into the new branch on my fork. It seems to work on web version.

It’s only the web version that highlighted my fork was 10 commits out of date. The desktop version happily says I’m up to date. I wonder if the desktop is only checking the files on my hard drive match the files on my fork, ie it doesn’t check if my fork is up to date with the main project?

Nope, that didn’t work.

I created a pull from the main project into my branch and I’m not allowed to approve my own pull into my own branch ?!?!?

I used the sledgehammer method. Deleted the fork and created a new one.

What am I missing? I can click on all sorts of view on the web version to see the changes in nice green and red blocks but nothing to say “yes please”.

I saw the console lines from @airtower-luna and thought “aha create a pull”. Apparently the author of a pull isn’t allowed to approve the pull even though the pull is into their own branch. I wonder if I need to create an imaginary friend to approve changes I want for my own branch?

git pull on the command line is very different from a pull request on GitHub. What git pull does is fetch a remote branch and merge it into your local one (as in, on your computer, where you run the command), with fast-forward (without a merge commit) by default. Basically pulling in updates from that remote.