I had made some changes to a file under a git repo, I committed the files using git commit
I then tried to push to master using git push origin master which returned Everything up-to-date
I typed git push origin head which seemed to work although I’m not sure if I’m supposed to do this. Previously git push origin head had always worked for me.
My question is, why would git push origin master not do anything and should I roll back and re-commit, then git push origin master?
If you’re working on a development branch, then
git push origin masterisn’t going to do anything because you’ve asked it to push themasterbranch. If you want to push your development branch, you need to run:…or whatever you’ve called your development branch. And after doing that once, you should generally be able to run
git pushwithout additional arguments.