0% found this document useful (0 votes)
14 views4 pages

Graded Lab3 - 1000015771

The document outlines the steps for forking a GitHub repository, making modifications, and pushing changes back to the forked repository. It details commands for adding, committing, and pushing files, as well as checking for conflicts with the upstream repository. Screenshots of each step are required to demonstrate the completion of the tasks.

Uploaded by

jainmanan110
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views4 pages

Graded Lab3 - 1000015771

The document outlines the steps for forking a GitHub repository, making modifications, and pushing changes back to the forked repository. It details commands for adding, committing, and pushing files, as well as checking for conflicts with the upstream repository. Screenshots of each step are required to demonstrate the completion of the tasks.

Uploaded by

jainmanan110
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Name: Manan Jain SAP:1000015771

Graded lab 3

Problems:

Fork the repository “john-smilga/javascript-basic-projects” on GIT Hub. Take the


pull from this repository on your local/remote master branch. (Note: Do not clone). Open
certain random files of this project on your local master branch and make certain changes
and add a comment with your name. Now provide the commands used by you for the
following:

• Add modified files


• Commit modified files
• Push the files to your GIT Hub branch
• Take pull on GIT Hub and compare the changes you have done.
• Also show how you have concluded that your changes have no conflict and they
are ready to be merged in the main live branch john-smilga/javascript-basic-
projects

Paste screenshots of all the steps you have followed to complete the whole problem
statement as mentioned above.
Steps & Commands:

Step 1: Fork the repository


1. Go to the repository: john-smilga/javascript-basic-projects.
2. Click the Fork button (usually found in the upper-right corner) to create a copy
of the repository in your own GitHub account.

Step 2: Pull the forked repository (without cloning)


1. Open your terminal (local machine) or use a remote shell.
2. Ensure you are in the directory of a Git repository you own.
1. bash
cd path-to-your-local-repository
2. Add the original repository as a remote.

git remote add upstream https://github.com/john-smilga/javascript-basic-projects.git


3. Fetch the latest changes from the upstream repository:

git fetch upstream


4. Merge the changes from upstream into your local branch:

git merge upstream/master


Step 3: Open files and make changes
1. Open random files within the project using any code editor like VSCode or
Sublime Text. Modify these files (e.g., add a comment with your name in the
JavaScript code).

Step 4: Add modified files to the staging area


Use the git add command to add the modified files.

git add .
Step 5: Commit the changes
Commit the modified files with an appropriate commit message.

git commit -m "Modified files with comments by Raj Vardhan"


Step 6: Push the changes to your GitHub repository
Push the changes from your local repository to your GitHub forked branch.

git push origin master


Step 8: Pull from GitHub and compare changes
1. After creating the pull request, take another pull from the upstream repository
to check if there are any conflicts:

git fetch upstream


git merge upstream/master
2. Git will notify you if there are any conflicts. If there are no conflicts, the merge
will happen automatically.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy