In my local repo if I execute
$git branch --all
it returns
* master
remotes/origin/develop
remotes/origin/master
that means that I have a local branch named repo and 2 remote branches.
If I do
$git checkout -b develop
it will create a local branch that is unrelated to remote branch .
The command
$git pull origin develop
it will connect my local branch with remote branch?
If by "connect" you mean you want your local branch to track the remote branch, then you need to have your branch --set-upstream
git branch --set-upstream develop origin/develop
Then things like git pull
and git status
will know which remote branch to track.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With