GitHub changed to BitBucket when doing git push -
i have both github , bitbucket accounts, use github one. few days ago when got client bitbucket repo, i've decided try out , have installed sourcetree, pulled repo there , ok. problem occurred when went on project on github repo. made changes, , console did add
andcommit
, , when wrote git push
came out:
warning: push.default unset; implicit value has changed in git 2.0 'matching' 'simple'. squelch message , maintain traditional behavior, use: git config --global push.default matching squelch message , adopt new behavior now, use: git config --global push.default simple when push.default set 'matching', git push local branches remote branches exist same name. since git 2.0, git defaults more conservative 'simple' behavior, pushes current branch corresponding remote branch 'git pull' uses update current branch. see 'git config' , search 'push.default' further information. (the 'simple' mode introduced in git 1.7.11. use similar mode 'current' instead of 'simple' if use older versions of git) fatal: current branch master has no upstream branch. push current branch , set remote upstream, use git push --set-upstream origin master
so figured i'd run git config --global push.default matching
command , try again. after got message saying:
password 'https://xyz@bitbucket.org':
where xyz
isn't username or username of shared repo users on bitbucket
so question how did happen, , how can revert push on github repo?
you mentioned git remote -v
output in comment of op:
$ git remote -v
origin https://xyz@bitbucket.org/xyz/project_name.git (push)
git remote -v
linked bitbucket repository. need change/set origin
github url.
$ git remote set-url origin <github-repo-url> # make sure 'origin' updated $ git remote -v
Comments
Post a Comment