Git does not update branch on repositoy

64 views Asked by At

I have a branch named deliveries and on this branch, I have made some new changes to some files.

Then I ran the command git add . to stage the files. And after that I ran git commit (I forgot to add message text).

I closed the Terminal, and tried git push to push the updated branch into server but it didn't add the changes.

However when I say git status, it says:

Everything up-to-date

So how to push the new changes into repository correctly?

1

There are 1 answers

2
Hemesh On

If it is not a master branch first you have to do this,

git checkout <branch-name>
git push # (it will say has no upstream).
git push --set-upstream origin <branch-name>

Note: <branch-name> is the branch which you want to push