我对git完全不了解,也没有使用过任何版本控制系统。我在本地进行开发,并正在寻找一种比FTP更简单的方式来部署文件到(LAMP)Web服务器。我很难配置Git(Windows版2.5)以在推送更改时自动更新其当前工作目录。在创建本地存储库、进行第一个提交并在别名origin
下添加远程位置后,我所做的如下:
- [remote]
ssh user@domain
- [remote]
cd testgit
- [remote]
git init
- [remote]
git config receive.denyCurrentBranch updateInstead
- [remote]
git status
: nothing to commit - [remote]
exit
- [local >> master]
git status
: nothing added but untracked files present - [local >> master]
git push origin master
第8步生成一个通知和两个错误:
stdin: is not a tty
fatal: bad config value for 'receive.denycurrentbranch' in config
fatal: Could not read from remote repository
我一直在寻找答案,但卡住了。我错在哪里了?