我有我的閃存驅動器上的本地工作副本回購和遠程回購。我已經推到閃存驅動器,但我似乎無法再次這樣做。git推遠程回購
這裏我進入我的遠程回購我的閃存驅動器,看看我在哪個分支,看着日誌。然後,我回到我的工作副本本地回購,編輯文件,添加該文件,提交了一個提交,並試圖將其推到我的閃存驅動器,但它不起作用。任何可以告訴我做錯了什麼?
David-Adamss-MacBook-Pro:~ davidadams$ cd /volumes/thumbdrive/repo/releventz
David-Adamss-MacBook-Pro:releventz davidadams$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#
nothing to commit (working directory clean)
David-Adamss-MacBook-Pro:releventz davidadams$ git branch
* master
David-Adamss-MacBook-Pro:releventz davidadams$ git log
commit 65328c9603f62b7a2058f38fb441605b0c4c431e
Author: David Adams <[email protected]>
Date: Wed Jun 29 23:30:40 2011 -0500
third commit
commit b3883fa933609db634b98d747299c1e9c96e8269
Author: David Adams <[email protected]>
Date: Wed Jun 29 23:10:53 2011 -0500
second commit
commit 54832381a6fe898408c9e07bc8409a2982ec6274
Author: David Adams <[email protected]>
Date: Wed Jun 29 22:20:04 2011 -0500
changed checklist.php
commit 1955664689313a589543576477e0a134f26cc313
Author: David Adams <[email protected]>
Date: Wed Jun 29 22:12:53 2011 -0500
first releventz commit
David-Adamss-MacBook-Pro:releventz davidadams$ cd
David-Adamss-MacBook-Pro:~ davidadams$ cd
David-Adamss-MacBook-Pro:~ davidadams$ cd /applications/mamp/htdocs/releventz
David-Adamss-MacBook-Pro:releventz davidadams$ git status
# On branch master
nothing to commit (working directory clean)
David-Adamss-MacBook-Pro:releventz davidadams$ git status
# On branch master
# 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)
#
# modified: application/libraries/calendarclass.php
#
no changes added to commit (use "git add" and/or "git commit -a")
David-Adamss-MacBook-Pro:releventz davidadams$ git add .
David-Adamss-MacBook-Pro:releventz davidadams$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: application/libraries/calendarclass.php
#
David-Adamss-MacBook-Pro:releventz davidadams$ git commit -m 'blah blah'
[master 853232d] blah blah
1 files changed, 1 insertions(+), 1 deletions(-)
David-Adamss-MacBook-Pro:releventz davidadams$ git push flashdrive master
Counting objects: 17, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (12/12), 1.89 KiB, done.
Total 12 (delta 8), reused 0 (delta 0)
Unpacking objects: 100% (12/12), done.
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable t
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing int
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in som
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, se
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
gTo /volumes/thumbdrive/repo/releventz
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to '/volumes/thumbdrive/repo/releventz'
錯誤消息似乎足夠清晰。 – bmargulies
[git push error'remote rejected \] master - > master(branch is currently checked out)']的可能重複(http://stackoverflow.com/questions/2816369/git-push-error-remote-rejected-master - 主分支 - 是 - 目前進行確認的鷗) –