Je sépare un repo git en 3. J'ai utilisé Detach (move) subdirectory into separate Git repository pour séparer le dossier et les ai poussés avec succès vers de nouveaux dépôts git. Sur le existant repo, j'ai utilisé la commande suivante pour effacer les répertoires déplacés.git push après git filter-branch rejeté
git filter-branch -f --index-filter "git rm -q -r -f --cached --ignore-unmatch lib/xxx/$REPO" --prune-empty HEAD
Maintenant, quand je fais git st
sur le repo d'origine, je reçois:
# On branch 1.5.0
nothing to commit (working directory clean)
Quand j'essaie de git push
, je reçois:
! [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.
Je pense à utiliser -f : git push -f origin <branch>
mais je souhaite m'assurer que cela va modifier mon repo existant.