My organization granted repository creation rights only to managers and convicting them to make one takes time and effort. When they do, they usually usethe default option of repo initialized with .gitignore
file. This prevents me from simply pushing my locally-created repositories with
git remote set-url origin git@bitbucket.org:.....
git push --set-upstream origin master
giving me:
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
while git pull
ends with:
fatal: refusing to merge unrelated histories
Note: I want to keep the local directory intact.