Should I stage and committ pulled changes before I push?

I know that before I try to push code out to the remote repository, I should always pull all the current changes from the remote repository to my local machine.

But after pulling all the changes from the remote repository, should I stage and commit those changes I pulled before I push my code to the remote repository?

Is there something to stage/commit after a pull? (There shouldn’t be. Pull is supposed to be the same as fetch and merge.)

It nice to keep your remote up-to-date. If you’re pushing directly to the remote with your changes, and don’t intend to open a Pull Request then there’s probably no point doing an intermediate push.

1 Like

Thank you for the clarification. I misunderstood what git pull does.