我最近在https://github.com/me/myRepo
. 然后在本地(在我的计算机上)我删除了一个rm ~/myDir/myFile
我现在正在尝试使其在 github 上消失但没有成功的文件。我做了:
cd ~/myDir
git rm myFile (I had already remove the file physically)
git add -A
git push
但是文件还在...
当我做
git commit -a
git push
这不起作用,我明白了
statquant@euclide:~/.vim$ git commit -a
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: bundle/Align (untracked content)
# modified: bundle/Clang_Complete-Pathogen (untracked content)
# modified: bundle/Vim-R-plugin (untracked content)
# modified: bundle/bash-support.vim (untracked content)
# modified: bundle/git (untracked content)
# modified: bundle/nerdtree (untracked content)
# modified: bundle/perl-support.vim (untracked content)
# modified: bundle/snipmate (modified content, untracked content)
# modified: bundle/tasklist (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")
statquant@euclide:~/.vim$ git push
To https://github.com/statquant/.vim.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/statquant/.vim.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.