我正在和我的同事在我们公司的 Ubuntu 中开展一个项目。他在我们俩都可以访问的共享服务器上为我们的项目本地创建了一个 git 存储库。而且我们不打算把它放在 Github.com 上
我已经克隆了那个项目,但是我找不到我的同事如何给我“贡献者权限”以拉到这个本地 git 存储库以及他如何查看我的更改以合并到主分支的方法。
我在网上搜索并找到了将网站放在 Github.com 并在网站上给予贡献者许可的唯一解决方案。
我看到有人说我们应该使用“git init --shared={all|world|everybody}”,但问题仍然存在,我如何才能推送到该存储库并且他可以在合并之前查看我的更改。我应该简单地运行“git push -u origin master”吗?
我的同事使用“git init --shared=0777”重新初始化了存储库。但是,当我在“git add .”和“git commit -m "STH EDITED"”之后尝试推送到这个存储库时,我收到以下错误:
majid@majid:~/Projects/Annotation$ git push -u /data/sstore-data/projects/AnnotateTool
warning: push.default is unset; its implicit value has changed in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the traditional behavior, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.
Since Git 2.0, Git defaults to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 1.45 KiB | 0 bytes/s, done.
Total 5 (delta 4), reused 0 (delta 0)
remote: error: insufficient permission for adding an object to repository database ./objects
remote: fatal: failed to write object
error: unpack failed: unpack-objects abnormal exit
To /data/sstore-data/projects/AnnotateTool
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to '/data/sstore-data/projects/AnnotateTool'