'Contributing to a GIT repository [duplicate]

The author of a repository on Github asked for contribution on his project by translating some language files. I tried to collaborate by doing the following steps:

  1. Clone the repository and make a Pull
  2. Create a branch "German_locale"
  3. Made changes to language files
  4. commit while adding a message
  5. Push branch to origin (failed)
  6. Intended final step: pull request on Github website

However, the 5. action fails. It asks for Username /Password and doesn't give me access if I'm providing my personal. I think, the system tries to verify me as the original author, which I am not.

The very basic questions are (sorry, I'm new):

  • What do I have to do in order to push a branch to a foreign repository? Do I have to ask for being a collaborator first? This doesn't seem right.

  • Would it be a better idea to create a fork in the first place? This doesn't seem right, either.

I'm using SmartGit as a client, so please describe the solution rather then providing command lines. I really want to understand how that works. I have seen other contributors translating other language files on this project successfully but have no idea how that works in general.



Solution 1:[1]

First, the owner of the repository should add you as a collaborator. Then you will be able to push changes to a remote Git repository.

Solution 2:[2]

As for github, there is another way to contribute.

  1. Fork the original repo. This will create the same repository in your github account with reference to original. Now you have your own repository, so there will be no push fails.
  2. Do your changes, commit and push them to your fork.
  3. Navigate to github.com and create a pull request, so the author of the original repo can review and accept (or decline) your contribution.

Git official tutorial

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