How to submit PR on GitHub


Today I needed to fix a typo on Kladi web page and decided to create tutorial. If anyone in the future decides to contribute can follow this write up and submit PRs.

Step 1: Fork the repo you want to change


Step 2. Clone repo to your local computer

np@np-INTEL:/mnt/speech1/nadira/stt$ git clone
np@np-INTEL:/mnt/speech1/nadira/stt$ cd kaldi/

Step 3: Checkout a new branch

np@np-INTEL:/mnt/speech1/nadira/stt/kaldi$ git checkout -b data_prep_typo_fix
Switched to a new branch 'data_prep_typo_fix'

Step 4: Add upstream

np@np-INTEL:/mnt/speech1/nadira/stt/kaldi$ git remote add upstream

Step 5: Change/Edit file

In my case I had to edit data_prep.dox

np@np-INTEL:/mnt/speech1/nadira/stt/kaldi$ cd src/
np@np-INTEL:/mnt/speech1/nadira/stt/kaldi/src$ cd doc/
np@np-INTEL:/mnt/speech1/nadira/stt/kaldi/src/doc$ pico data_prep.dox

Step 6: Add , Commit and Push changes

np@np-INTEL:/mnt/speech1/nadira/stt/kaldi/src/doc$ git add data_prep.dox 
np@np-INTEL:/mnt/speech1/nadira/stt/kaldi/src/doc$ git commit -m "change [utter] to [utterance.] in data_prep.dox"
[data_prep_typo_fix f9fe32534] change [utter] to [utterance.] in data_prep.dox
 1 file changed, 1 insertion(+), 1 deletion(-)
np@np-INTEL:/mnt/speech1/nadira/stt/kaldi/src/doc$ git push -u origin data_prep_typo_fix


np@np-INTEL:/mnt/speech1/nadira/stt/kaldi/src/doc$ git push -u origin data_prep_typo_fix
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 24 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 449 bytes | 449.00 KiB/s, done.
Total 5 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
remote: Create a pull request for 'data_prep_typo_fix' on GitHub by visiting:
 * [new branch]          data_prep_typo_fix -> data_prep_typo_fix
Branch 'data_prep_typo_fix' set up to track remote branch 'data_prep_typo_fix' from 'origin'.

Step 7: Compare and Pull

Press on Compare and pull request button in your forked repo to submit a PR.


Step 8: Create pull request

Add a comment and submit pull request.


After submitting a PR you will see a page similar to this one.


Step 9: You can delete the created branch

After some time the PR can get merged to original project by the project owner. Press on delete branch button to delete it.