sto separando una git repo in 3. Ho usato Detach (move) subdirectory into separate Git repository per separare cartella e li spinse con successo alle nuove repo git. Sul esistente pronti contro termine, ho usato il seguente comando per cancellare le directory spostati.git push dopo git filter-branch respinto
git filter-branch -f --index-filter "git rm -q -r -f --cached --ignore-unmatch lib/xxx/$REPO" --prune-empty HEAD
Ora, quando faccio git st
sul repo originale, ottengo:
# On branch 1.5.0
nothing to commit (working directory clean)
Quando provo a git push
, ottengo:
! [rejected] 1.5.0 -> 1.5.0 (non-fast-forward)
error: failed to push some refs to '[email protected]:/xxx/.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
La mia ipotesi è quella di utilizzare -f : git push -f origin <branch>
ma desidero fare in modo dal momento che questo sta andando a modificare il mio repo esistente.