#1 How to make a Pull Request?
Opened 4 years ago by frantisekz. Modified 4 years ago

How to do pull requests

  • create an account on Pagure, don't forget to add your public ssh key to Pagure (click on your avatar > My settings > SSH Keys > Add SSH key)

  • fork this repository (upper right corner)

  • clone your forked repo using SSH option

  • add our repo as upstream remote

$ git remote add upstream https://pagure.io/fedora-qa/oraculum-client.git
  • to get the latest commit from our branch do (you'll need this later):
$ git checkout master
$ git fetch upstream/master
$ git rebase upstream/master
  • it is a good practise to create separate branch for each feature or fix you are going to do:
$ git checkout -b <name of new branch>
  • once you are done coding, commit your changes and push them, use git diff and git status to see if you haven't changed anything else by accident; the first time you push your branch to origin use this command:
$ git push -u origin <branch name>
  • create pull request, provide description or at least link to an issue.

  • you will probably add several more commits after the feedback from pull request review, in the end squash those commits to one, you will need a hash of a commit that is before the commits you want to squash :

$ git log
commit <hash>
  your change 3

commit <hash>
  your change 2

commit <hash>
  your change 1

commit <hash>
  you want to use hash of this commit


$ git rebase -i <the commit before the ones you want to squash>
  • if you squashed commits, you'll have to do force push:
$ git push -f
  • it is possible that there have been changes in our master meanwhile, or you simply forgot to fetch changes before you started, you'll have to fetch new changes (see above), checkout to your branch and rebase your branch:
$ git rebase master
  • when rebasing, there might be conflicts you'll have to resolve

Log in to comment on this ticket.

Metadata