What are the best practices for managing JavaScript files in a PHP project to ensure changes are reflected accurately on the local server?

When managing JavaScript files in a PHP project, it is important to ensure that changes made to the JavaScript files are reflected accurately on the local server. One way to achieve this is by properly linking the JavaScript files in the HTML templates using relative paths. Additionally, using version control systems like Git can help track changes and ensure that the latest version of the JavaScript files are deployed to the server.

<!DOCTYPE html>
<html>
<head>
    <title>My PHP Project</title>
    <script src="js/script.js"></script>
</head>
<body>
    <h1>Welcome to my PHP project!</h1>
</body>
</html>