我們使用git進行版本控制,現在我們在嘗試上傳最新版本時收到很多警告。我是git的新手,並沒有耐心的限制,有沒有什麼辦法可以刪除所有內容並上傳當前版本?刪除所有內容並上傳新版本
這是我現在嘗試上傳時得到的結果。
$ git push origin master
Username for 'https://code.google.com':
Password for 'https://<removed>@code.google.com':
To https://code.google.com/p/<removed>/
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://code.google.com/p/<removed>/'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
這將有助於顯示你正在嘗試命令的順序和你得到的輸出 –
「刪除所有內容並上傳當前版本」聽起來很像你沒有使用git進行版本控制,而是用它來代替一個出版工具。你能發佈你收到的警告嗎?即使你沒有耐心去理解他們,但如果他們能夠幫助,他們也不得不去做。 –
我粘貼了我現在得到的提示。我明白我以前得到了什麼,但它似乎不必要,因爲我的計算機上的代碼運行良好,並且在線版本上的代碼已過時。我只是想開始新鮮。爲什麼如此犯規我不知道 – zehelvion