When I am in the master
branch, the git push
command transfers my local commits to the common repository. And when I'm in another thread and writing git push
, something strange starts to happen. Why?
|
1 answer
Because git push without parameters will not necessarily send the current branch. And not necessarily one. And since someone made commits in the main branch, you won't be able to push your changes to pull. Enter git remote show origin
and see which branches are configured to push and everything will become clear. To avoid misunderstandings, always explicitly specify the branch - git push origin vetka
.
|