I am working on a project with my colleague inside our company in Ubuntu. He has created a git repository for our project locally on a shared server to which both of us have access. And we do not intend to put it on Github.com
I have cloned that project, but I could not find a way how my colleague can give me "contributor permission" to pull to this local git repository and how he can review my changes in order to merge to master branch.
I have searched in the net and found only solution of putting the website in Github.com and giving contributor permission in the website.
I have seen some people say we should use "git init --shared={all|world|everybody}", but still the question remains, how I can push to that repository and he can review my changes before merging. Shall I just simply run "git push -u origin master"?
My colleague has reinitialized the repository with "git init --shared=0777". However, when I try to push to this repository after "git add . " and "git commit -m "STH EDITED" " I receive the following error:
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'
shared
flag.git request-pull
. It depends on your team whether that's really necessary or if it's sufficient to just ring up your colleagues.