问题描述
我已经安装了Git,并将其配置为CentOS和Windows中的客户机作为服务器。
然后我做了一个回购并试图推动更改,但因错误 code>和谷歌搜索后,我才知道 git config receive.denyCurrentBranch忽略
然后我尝试再次推送更改
〜/ Documents / GitHub / Proj02(master)
$ git push origin master
警告:将192.168.56.102(RSA)永久添加到已知主机列表中。
[email protected]的密码:
计数对象:2,完成。
使用多达4个线程的增量压缩。
压缩对象:100%(2/2),完成。
写入对象:100%(2/2),229字节| 0字节/秒,完成。
总计2(delta 1),重用0(delta 0)
到ssh://[email protected]:/ home / git / Proj02 /
75a8cb9..484d414 master - > ; master
〜/ Documents / GitHub / Proj02(master)
但我无法看到在远程服务器上的更改
[git @ centos Proj02] $ git config receive.denyCurrentBranch忽略
[git @ centos Proj02] $ ls
注意:然后在服务器上看不到更改后,我创建了一个文件夹服务器repo并推送更改并从stdout中看到我从客户端推送的文件发生的更改,它们被删除,并且最近推送的更改被提交。
我试图实现一个Git服务器。
如何查看我刚才推送的更改?
确保:你的服务器有git 2.3 +
$ b
git config --global receive.denyCurrentBranch updateInstead
(请参阅)
确保首先您的服务器上的repo不是。
I have installed Git and configured it as server in CentOS and Windows as client machine.
And then I made one repo and tried to push changes but failed with error updating the current branch in a non-bare repository is denied and after google search I came to know git config receive.denyCurrentBranch ignore
Then I tried again pushing the changes
~/Documents/GitHub/Proj02 (master) $ git push origin master Warning: Permanently added '192.168.56.102' (RSA) to the list of known hosts. [email protected]'s password: Counting objects: 2, done. Delta compression using up to 4 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 229 bytes | 0 bytes/s, done. Total 2 (delta 1), reused 0 (delta 0) To ssh://[email protected]:/home/git/Proj02/ 75a8cb9..484d414 master -> master ~/Documents/GitHub/Proj02 (master)
But I am unable to see the changes at Remote server
[git@centos Proj02]$ git config receive.denyCurrentBranch ignore [git@centos Proj02]$ ls
Note : Then after I dont see changes at server , so I created one folder in the server repo and push the changes and from the stdout I saw the changes that the files I pushed from client , they got deleted and the recent changes that I was pushed got submitted.
And I am trying to implement a Git server.
How can I see the changes I just pushed?
Make sure that:
- your server has git 2.3+
you have set on that server:
git config --global receive.denyCurrentBranch updateInstead
(See "Push to a non-bare Git repository")
Make sure first that your repo on the server is not a bare repo.
这篇关于更改不反映在git服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!