Daniel Paczuski Bak
Daniel Paczuski Bak

Reputation: 4080

How do I make a pull request using EGit?

I have a local master branch and I want to create a pull request with a repo owned by somebody else. When I attempt to "push branch", I get the following text: "can't connect to any URL: https://github.com/jleclanche/fireplace: git-receive-pack not permitted"

I'm guessing that what I'm doing here is actually trying to merge, rather than making a request. How would I do this?

Upvotes: 4

Views: 14641

Answers (3)

Ankita Thakur
Ankita Thakur

Reputation: 1

If From Eclipse you commit the changes but due to conflict you cant get the Pull Request so do following steps to get pull req from git bash command

  1. git status

  2. git checkout develop-robot

  3. git log [check your commit present or not]

  4. git pull

  5. git checkout

  6. git rebase develop-robot

  7. git push -u -f origin

Upvotes: 0

lighthouse keeper
lighthouse keeper

Reputation: 121

In this answer, I assume that you have commit rights on the project in question, but still want to create a pull request. In this case, it's not necessary to fork the repository.

  1. Create a local branch in Eclipse (Team -> Switch to -> New branch..., use the default values) and work on it. Eventually, push the branch to the GitHub repository.
  2. Go to the repository on github.com.
  3. GitHub will usually recognize that you have pushed a branch and offers the option to create a pull request directly. Alternatively, you should be able to create a pull request from the "pull requests" tab.

Upvotes: 1

Rüdiger Herrmann
Rüdiger Herrmann

Reputation: 20985

These are the steps necessary to fork a repository, make changes and finally open a pull request to have the changes merged back into the originating repository.

  1. On GitHub, navigate to the repository's page and click the Fork button in the top-right corner of the page

  2. Copy the URL of the forked repository to create a local clone in EGit

  3. I recommend creating a new branch in the form your-name/issue-name. Working on a separate branch gives a better oversight and helps when working on multiple pull requests in parallel.

  4. Make one or more commits that should end up in a pull request.

  5. Push these changes to the forked repository.

  6. On GitHub, navigate to the fork's page. You should see a message there indicating that a new branch was created and a button to create a pull request. Click this button. On the next page, you can provide more information and finally confirm the creation of the pull request.

In order to consume changes made to the originating repository, you would want to add it as a remote to your local clone.

You may even want to rename the remotes, so that the forked repository (the one you are pushing to) is named fork and for the originating repository use the default name origin.

For example:

[remote "fork"]
  url = [email protected]:your-name/forked-repo.git
  fetch = +refs/heads/*:refs/remotes/fork/*
[remote "origin"]
  url = [email protected]:user/originating-repo.git
  fetch = +refs/heads/*:refs/remotes/origin/*

Upvotes: 10

Related Questions