I provide step-by-step explaination for making changes and updating the forked repo and then contributing back to Prof. Rangan's repo by creating a pull request.
Note: Students can also provide the feedback using these instructions without forking the original repository.
Prereq1: Access to Git Bash
Prereq2: You forked the introml repository and cloned it on your local machine (e.g. git clone https://github.com/
ishjain
/introml.git
) Note that I used my GitHub username ishjain, which you must replace with your own username (not sdrangan, nor yaowangatpoly).
Prereq3: Basic configuration of name and email address is done using Git Bash command line. E.g.
git config --global user.name "Ish Kumar Jain"
git config --global user.email "ish***@gmail.com"
Check the configuration using command git config --list
Note: A good introductory tutorial video (30 min) by David Mahler. It explains basics of GitHub like creating/cloning a repository, basic commands (git add and git commit), and checking status and commit history (git status and git log). I recommend this video to anyone new to the GitHub environment.
Now, suppose you made some changes in the files or created new files. Follow these steps to update the online repository.
cd introml
Note that you may need to provide a full path to the introml if introml folder is not in the same directory. check the current working directory using pwd
and use command like cd \path_to_intoml\introml
, with path_to_introml
replaced by the path to the introml folder cloned using your own forked repository.
git status
It says there is one untracked file and suggests using git add
command.
Note: You can also see the difference/changes inside all the files using git diff
command.
git add .
Note the dot at the end (It is part of the code). This command will add all the new files to the staging area. To add any specific file use git add filename.pptx
.
Now check the status using git status
.
It says the changes need to be commited.
git commit -m "Modified Lecture-1 slides"
You can give any reasonable message for making the commit.
Check the status again: git status
git log
In order to exit use Shift + Q
key.
git push -u origin master
It may ask you to login to your github account for the first time. After this, you can see the changes in the online github repository.
Go to your GitHub page. E.g. https://github.com/ishjain/introml and click on Pull Request
See the changes and confirm the Pull Request. Prof. Rangan can then be able to merge this pull request to his original repository.
In case Prof. Rangan makes any changes in his original GitHub repo, you can apply those changes to your forked repo using this tutorial on syncing a fork. It basically downloads all the new commits made in the original repo (by Prof. Rangan) to a new branch called 'upstream/master' in your repo and merges this branch to your master branch.
Again this Part-2 tutorial video (30 min) by David Mahler on creating and merging branches is very useful.