In our previous tutorial, we showed you how to create and sync a GitHub repository to your Ubuntu VPS server. Using the last tutorial as a springboard, we’ll continue on and show you how to commit and push a script from your Ubuntu server to your GitHub account.
After we SSH into our server, open a terminal and cd into the folder we created in the previous article. In this folder, we will create a simple JavaScript program.
vim helloworld.java
public class HelloWorld {
public static void main(String[] args) {
// Prints "Hello, World" to the terminal window.
System.out.println("Hello, World");
}
}
Next, using the following command, you’ll see that the helloworld.java file is highlighted in red indicating that the data has not yet been committed to our GitHub account.
git status
Example Output:
#tutorials #git environment #git repo #linux #ubuntu