简体   繁体   中英

How can collaborators push their changes to my repo in GitHub

  1. First I have created one project in Eclipse and committed to my GitHub using below commands:

     git init git add . git commit -m "first commit" git remote add origin URI of my repo git push -u origin master

  2. Then I modified one file in Eclipse and committed to GitHub from Eclipse through creating remote and giving the remote URI of the repo.

  3. I added my team member through add collaborator.
  4. Then he downloaded my project and made a change in a file in Eclipse.

Now, how can he push that modified file to my GitHub repository from within Eclipse?

We have done one thing. He created a remote and gave the URI of my repo. But still we are unable to commit that file.

You need to add your colleague as a collaborator . This can be done in the desired GitHub repo via Settings > Collaborators (you need to type in your password again). Afterwards they have those permissions.

协作者设置

UPDATE

Sorry and good morning ;)

I overlooked that you already added your partner as a collaborator. Another possible reason for your situation could be in the Temporary interaction limits where you can, amongst others, limit the interaction with your repo to prior contributors.

临时交互限制

If that doesn't help. Please add some more informations about your colleague's git logs.

UPDATE 2

@Rahul K regarding your comment (which you better add to your question, for faster recognition), your colleague first needs to integrate the remote changes via git pull origin master in order to be able to push his or her changes afterwards. But be aware that he or she might need to migrate any conflicts to files both of you applied changes to.

Best regards, David

I have resolved the issue by cloning the repo in my local folder, adding the project to eclipse and changing the file committed.

Before that you have to add that person as a collaborator. So that he/she can clone your repo using the command below:

git clone "Path to the repository"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM