I have two local branches, master and dev
When I write git branch -v I get
master f83fskr [origin/master: ahead 2] some commit message
def kfdsj42 other commit message
I want both branches to have origin/master as their upstream branch, so that it will show
master f83fskr [origin/master: ahead 2] some commit message
def kfdsj42 [origin/master: ahead 3] other commit message
And also so that I could use git pull, git push without specifying a branch.
How can I achieve this? (-u didn't work)
Checkout to def branch and set-upstream-to (-u) origin/master branch. Now, git push, git pull commands should work.
$ git checkout def
$ git branch -u origin/master
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