0

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.

Hubert Bossy
  • 140
  • 1
  • 11
  • https://stackoverflow.com/search?q=%5Bgit%5D+hint%3A+Updates+were+rejected+because+the+tip+of+your+current+branch+is+behind – phd Jun 16 '23 at 19:12
  • This question is unrelated and the only common part is generic git message. – Hubert Bossy Jun 17 '23 at 22:44

1 Answers1

0

Turns just forcing the push was sufficient.

git push --force
Hubert Bossy
  • 140
  • 1
  • 11