- The reviewer wants some changes in index.html and web.config files
- Then new member will modify the files and perform add, commit and push changes
- Then new member will create PR of wrong files with main branch
- The owner will check and add comments to member to remove this file using git bash
- The new member removes this file and push changes. Create PR, add reviewer to owner
- Owner will merge the new member code
Note
Before going through this session, please visit my below-mentioned sessions related to Git and GitHub,
- Introduction To Git
- Steps For Configuring Git With Details
- Let's Know About Git Add, Git Commit, Git Status, And Git Push-In Details
- Let's Understand How Git Maintains History Of Version Or Commit Ids With Details
- Steps To Initialize A Git Repository And Push The Changes To GitHub In Details
- Let's Know About Git Branches And How To Implement It
- Let's Understand About Git Branches And Its Real-Time Uses
- Let's Learn About Merging The Git Branches And Create Pull Request In Details
- Steps To Ignore Files Using Gitignore In Details
- Let's Learn About Git Default Branch In Detail
- Steps To Create And Configure Organizations In GitHub In Details
- Let's Learn About GitHub Projects In Detail
- Let's Know About Team In GitHub In Details
- Managing Files On GitHub In Real-Time - Owner Uploads Project In GitHub Repo
- Managing Files On GitHub Using Git Bash In Real-Time Scenario - Know About GitHub Reviewer
The reviewer wants some changes in index.html and web.config files
Here the reviewer will add some comments in PR#1 as described in the previous article to make some changes in Index.html and Web.config files.
Then the new member will receive a mail about changes given by reviewer as shown below.
Then the new member will login to his/her GitHub account and check the PR#1 for these comments.
Then new member will modify the files and perform add, commit and push changes
The member will open the project file and modify the index.html file in calendar section as per requirements.
Then the member will run that web application and see the changes as shown below.
Now we check the history section where the project is modified by which GitHub users as shown below. As of now we can see the changes in the GitHub repo made by the owner called Infosatya with commit ID and commit message as shown below,
Now we can compare the changes of index.html as shown below,
Now the member makes some changes in Web.config file as shown below. He added the comments in Web.config file.
Now we check the history section where the project is modified by which GitHub users as shown below. As of now we can see the changes in the GitHub repo made by the owner called Infosatya with commit ID and commit message as shown below,
Now we can compare the changes of index.html as shown below,
Then new member will modify the files and perform add, commit and push changes
Now, we change the directory to WebApplication1 of the GitHub repo folder as shown below.
Check the status using Git Bash and we can see the modified file name index.html as shown below. Here we can see other files which are auto-generated while building the solution. So, we need to ignore these files. We can see those changes in Visual studio as well as in Git Bash.
Using Visual Studio,
Using Git Bash,
Here the member adds the changes of index.html to the staging area as shown below and then commit those changes to the staging area using the command as shown below,
Here the member adds the changes of Web.config to the staging area as shown below and then commit those changes to the staging area using the command as shown below,
Then push those files from local git to GitHub repository using the command as shown below,
Now, we can see the update in the View History section of index.html after pushing the changes using Visual Studio as shown below,
Now, we can see the update in the View History section of Web.config after pushing the changes using Visual Studio as shown below,
After successfully pushing these changes to the GitHub repo my new branch called satyaCsgithub_BranchRepo will be shown with the modified file in the GitHub repo as shown below,
After selection of branch, we can see the changes with commit message as shown below,
The commit changes of index.html file as shown below,
The commit changes of Web.config file as shown below,
But in the same index.html and Web.config files if we check the commit messages under the selection of the main branch then these changes are not available as shown below,
Then new member will create PR of wrong files with main branch
Click the Pull Request option as shown below,
Then create a pull request with details as shown below,
In pull request, we can check if the before changes and after changes of index.html and Web.config need to be merged under the Files changed option.
Here the member will add the Reviewers to review the changes under this pull request as shown below. Here we can request up to 15 reviewers. So, here the member added the owner as of the Reviewer.
InfoSatya was requested for review as shown below,
Here the owner called InfoSatya will get a mail that @satyaCsgithub requested your review on #2 as shown below. Here #2 is a link navigate to the pull request URL created by satyaCsgithub member i.e. https://github.com/SatyaOrgGlobal/HealthCare-Proj/pull/2
The owner will check and add comments to member to remove this file using git bash
Here the owner InfoSatya will login to his GitHub account and review the changes of satyaCsgithub using the pull request URL as described earlier.
Then the Reviewer will check the index.html, Web.config files and its changes under the Files changed section.
Here we check the comments added by the Reviewer to make changes in the index.html file as shown below,
Here the satyaCsgithub member will get the mail about the changes requested by the Reviewer as shown below,
The new member remove this file and push changes. Create PR, add reviewer to owner
The member will remove specific file from pull request using Git Bash commands as shown below,
After push these changes the member can see the updated commit messages in history section of Visual studio as shown below,
Now check the GitHub repo as shown for the latest changes as shown below,
Now check the Web.config file changes made in GitHub repo as shown below,
So, we check the code status with commit changes as shown below,
Now we can see the Web.config file has been removed from Files changes section of pull request or PR as shown below,
Owner will merge the new member code
Now the owner will Merge the pull request as shown below,
Now merged with the main branch successfully as shown below,
Now go to the main branch and check the index.html with the latest changes after successfully merged as shown below,
Now check the index.html and Web.config files with the latest commit message in the main branch for production deployment as shown below,
Now satyaCsgithub members will login and check the pull request or PR request as shown below. Here members will get mail about successfully merged pull requests.
Now check the merged PR status as shown below,
Now owner will pull the latest changes in local git as shown below. First, the owner will be identified using Author Identity.
Now the owner will open the solution using Visual Studio and check the index.html under the main branch as shown below,
Now the owner can see the latest changes of index.html and Web.config under the main branch. Here owner will check the history of commit ID and message as per the latest changes made in GitHub repo by GitHub repo members as shown below.
For index.html,
For Web.config, It does not show anything because from PR this file has been removed. So, the reviewer can't see that commit message after clone the latest changes.
But if we open the project directory of member after push changes then we can see the commit message of Web.config file as shown below,
Summary
In this write-up, we have learned the below details,
- The reviewer wants some changes in index.html and web.config files
- Then new member will modify the files and perform add, commit and push changes
- Then new member will create PR of wrong files with main branch
- The owner will check and add comments to member to remove this file using git bash
- The new member remove this file and push changes. Create pr, add reviewer to owner
- Owner will merge the new member code
Thank You & Stay Tuned For More