In SourceTree I see the push button to push it to github online (at least I think that’s what it does, correct me if I’m wrong please), but there’s no red number by it saying there’s a push available. I have commits after the origin that I last pushed, so I don’t know why it’s not giving me the option to push them.
Confirm that GitHub actually doesn’t have them. SourceTree has a checkbox in the commit screen that asks you if you want to automatically push as soon as you commit (‘Push changes immediately to origin/master’). If that has been checked, then your commits will already be there. Do you see an origin/master
commit in the commit history as well? That will tell you which commit GitHub is on.
I did confirm that Git doesn’t have them. I do see a origin/master. The last one that was pushed was Setting Up a Git Repo, so it hasn’t asked me for a push since I set it up in the first place. The blue Head is the last one that I committed, but the red origin/head, origin/master, and master are all on the Setting Up a Git video.
Interesting. So git just won’t recognize that origin/master
is behind. What do you see in your push screen? Is your local master
set to track origin/master
? Or when you do click “Push” do you see this screen? Or do you see a “Remote Branch” that is blank?
I see that screen but when I select Push nothing happens. When I try to push immediately when I commit it says "Push changes immediates to - " so maybe it doesn’t know where to push to anymore for some reason. How do I direct where it needs to go?
So I found where to direct it I think (Where it says “Push to repository” on the image above). It’s still not doing anything though, it shows that the Head changed but the origin didn’t.