Apologies in advance. I'm sure this is a very simple question with a very simple answer but I'm a beginner at Git and I'm a bit lost. I have a master branch. I made some changes yesterday and performed git add .
, git commit
, made a new branch by doing git branch part-one
, then I pushed the commits to that new branch by doing git push origin part-one
. I see that my commits got pushed into that branch on github. Now, I did some more work on the same files. I added and staged the changes just as before. Now when I go to push the commits by doing git push origin part-one
it says Everything up-to-date
. I don't see the most recent commits in my history on github.
Why is it not pushing the most recent commit to my part-one
branch?
Possible cause: If I wanted to push these commits to my branch. Was I supposed to be do git checkout part-one
, then do git add
and git commit
? I did those commands while I was on the master.