Push branches

Push other branches

If you want to push changes made in other local branches to the remote repository, you need to switch to the branch and then use the git push command with the branch name. For example, if you have a local branch named new-feature, you can push changes in that branch to the remote repository using the following command:

git push -u origin new-feature

This will push the changes made in the new-feature branch to the remote new-feature branch in the origin repository.

In summary, the git push command only pushes changes in the current branch to the remote repository by default. If you want to push changes in other local branches, you need to switch to the branch and use the git push command with the branch name.

Last updated