Name:
PID: (page 1)
What command may I have run to get this screen?
How can I make an edit?
How do I save and exit?
// A simple web server using Java's built-in HttpServer
// Examples from https://dzone.com/articles/simple-http-server-in-java were useful references
import java.io.IOException;
import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.net.InetAddress;
import java.net.URI;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;
interface URLHandler {
String handleRequest(URI url) throws IOException;
}
class ServerHttpHandler implements HttpHandler {
URLHandler handler;
"~/src/docsearch-23/Server.java" [dos] 55L, 2055B 1,1 Top
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Committer: Joseph Gibbs Politz <cs15lwi23@ieng6-202.ucsd.edu>
#
# On branch main
# Your branch is up to date with 'origin/main'.
#
# Changes to be committed:
# modified: Server.java
#
~
~
~
~
"~/docsearch/.git/COMMIT_EDITMSG" 12L, 326C 1,0-1 All
What command may I have run to get this screen?
How do I edit the commit message and exit?
Summarize: what are the steps to edit a file in Vim?
git commit
git add
git push
git clone
Name:
PID: (page 2)
Describe a sequence of commands/actions, all from the command line, to clone a repository called greeting, make a change to a file within that repository called Main.java (shown below) to print "Greetings, world!" rather than "Hello, world!", run it to check, then commit and push it with a commit message that says "Updated"?
Write your instructions specifically enough that someone else would know exactly what to type. (Assume you that when pushing, the account will have access to change the repository).
1. Run git clone git@github.com:ucsd-cse15l-w23/greeting.git
2. Use cd greeting to change into it
3. Describe how to edit it....
4. Describe how to check that it worked....
5. Describe how to commit and push
class Main {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}