'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.



Solution 1:[1]

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.

Collaborator settings

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.

Temporary interaction limits

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

Solution 2:[2]

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"

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 David Artmann