Skip to content

Latest commit

 

History

History
43 lines (36 loc) · 2.09 KB

git-guidance.md

File metadata and controls

43 lines (36 loc) · 2.09 KB

creating a pull requests:

Steps on how to create a Pull Request are written below. Click here for a video explaining steps below please.

  • Fork the below github repository
    https://github.com/qiskit-community/ecosystem
  • After the Fork and Clone the github repository in your local system
    git clone git@github.com:<your_user_name>/ecosystem.git
  • Keep your fork up-to-date
    git remote add upstream https://github.com/qiskit-community/ecosystem.git
  • Checkout the Main branch and merge the up-stream
    git checkout main
    git merge upstream/main
  • Create a new branch in your clone to store your changes
    git checkout main
    git branch new-branch
  • Switch to the created branch
    git checkout my-branch
  • Do the necessary changes required for the PR, save your changes and add the files using git add
    git add <files_you_changed>
  • Add the desired message to your commit using
    git commit -m "message"
  • Push the changes to github
    git push --set-upstream origin new-branch -create the pull request Go back to the browser and go to your fork of the project. At top of the repo, there should now be a button called "compare & pull request". Click that, enter your commit message and a comment, and then click "create new pull request"

merging a pull request

  • Checkout the branch you're merging to in the target repo

    git checkout main

  • Pull the development branch from the fork repo where the pull request development was done
    git pull https://github.com/forkuser/forkedrepo.git my-branch

  • Merge the development branch
    git merge newfeature

  • Push main with the new feature merged into it
    git push origin main