Should I stage and committ pulled changes before I push? #22835
-
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? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
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. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the clarification. I misunderstood what git pull does. |
Beta Was this translation helpful? Give feedback.
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.