Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
81 views8 pages

Create Patch File V3a

The document provides instructions for creating a patch file from changes made to a software engineering program. It explains that a patch file allows developers to share code changes between repositories. The steps are to add all changes to the index, configure the user identity, commit with a message, and generate a patch file for the most recent commit using the format-patch command. Successfully following the steps will result in a .patch file being created in the local repository directory.

Uploaded by

MANISH KUMAR
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)
81 views8 pages

Create Patch File V3a

The document provides instructions for creating a patch file from changes made to a software engineering program. It explains that a patch file allows developers to share code changes between repositories. The steps are to add all changes to the index, configure the user identity, commit with a message, and generate a patch file for the most recent commit using the format-patch command. Successfully following the steps will result in a .patch file being created in the local repository directory.

Uploaded by

MANISH KUMAR
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/ 8

JPMorgan Chase Software Engineering Virtual Experience

Software engineering task :


making a patch file
Setting up your dev environment for the program!

Disclaimer
● This guide is only for those who did the setup locally on their machines.
● For those using REPL (from module 1), please use this guide instead
Setting up your dev environment for the program!

Prerequisites
● Set up should have been done. This means,your server and client
applications should have been running with no problems without introducing
any changes to the code yet. You can verify this if you get a similar result to
any of the following slides that include a picture of the server and client app
running together

● You should have made the necessary changes to the client script to make the
application output correct values
Setting up your dev environment for the program!

Intro: What is a patch file


● You should know by now that git is a way for developers to manage code in a
project especially if there’s other developers collaborating in that project too.

● A git patch file is just a file that you can apply to a repository to get the
changes / modifications / additions another developer did on his / her machine
onto your local machine. This isn’t the only way to do that ofcourse but this is
a viable method for a head/lead developer to check your code first before
merging it into the repository’s main/master branch.
Setting up your dev environment for the program!

How to make a patch file


● Fire up a terminal, enter the repository via the terminal you opened (via the cd
<repo_name_here> aka change directory command) and do the following commands
(one line, one command)

git add -A
git config user.email "<your_email_address>"
git config user.name "<your_name>"
git commit -m 'Create Patch File'
git format-patch -1 HEAD

note: make sure you use your personal email address and your real name
Setting up your dev environment for the program!

How to make a patch file


The final command, i.e. git format-patch -1 HEAD, should produce the .patch file
you’d want to submit to complete this module. It will be located in the directory
where you executed the command.
Setting up your dev environment for the program!

How to make a patch file

● That’s how it would look like if you executed the commands properly
● note: ls will only work for Linux and Mac environments. For Windows, use dir
to list the files in the current directory so you can verify that you created the
patch file
Setting up your dev environment for the program!

And you’re done!


● Submit the patch file on the right module page

You might also like