Tôi đã tạo một repo git và cập nhật nó với một số thứ. Sau đó tôi tạo một thư mục mới cho dự án này và khởi tạo git mới cho nó. Bây giờ tôi muốn đẩy những thay đổi và thay thế những cái cũ trong repo. Khi tôi làm git push origin master
Tôi nhận đượcLàm thế nào để thay thế git repo?
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:Username/repo2.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again. See the 'Note about
fast-forwards' section of 'git push --help' for details.
Tôi có thể làm gì?
liên quan: http://stackoverflow.com/questions/8461528/replace-github-repo-while-preserving-issues-wiki-etc –