Tools
COP-3223
Table of Contents
1. Overview
In this project, you will exercise the tooling used in this course, including git, emacs, and gcc.
2. Log in to eustis
Be sure to see ssh client setup which provides per-OS instructions for setting up ssh.
ssh into eustis, replacing NID with your UCF NID.
ssh NID@eustis.eecs.ucf.edu
If this is your first time connecting, you will see
The authenticity of host 'eustis.eecs.ucf.edu (<no hostip for proxy command>)' can't be established. ED25519 key fingerprint is SHA256:A547JbeYFTav5+gE7Xc0xyo8no6/2Wo23r3DbhJ4OSk. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])?
Be sure the key fingerprint matches (valid as of 2026-01-21) and type yes then hit enter.
You'll then be prompted to enter your UCF NID password:
Welcome to eustis.eecs.ucf.edu. Please use your NID and NID password to log in. Your NID should be 2 letters followed by 6 digits. See http://t.cs.ucf.edu/help/eustis for additional instructions. NID@eustis.eecs.ucf.edu's password:
Type your password (there will be no output on the screen as you type) and hit enter. If your username and password is correct you will see the command prompt:
NID@net1547:~$
You can try typing whoami and hitting, which will just print out your username:
NID@net1547:~$ whoami
This will print your UCF NID.
You can also trying running the neofetch command (installed as of 2026-01-21) to see information about the eustis server:
NID@net1547:~$ neofetch
This will display an ascii art logo of the distribution and some machine info:
.-/+oossssoo+/-. NETID@net1547.net.ucf.edu
`:+ssssssssssssssssss+:` ----------------------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 24.04.4 LTS x86_64
.ossssssssssssssssssdMMMNysssso. Host: PowerEdge 2950
/ssssssssssshdmmNNmmyNMMMMhssssss/ Kernel: 6.8.0-138-generic
+ssssssssshmydMMMMMMMNddddyssssssss+ Uptime: 10 days, 17 hours, 32 mins
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Packages: 4477 (dpkg)
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Shell: bash 5.2.21
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ Resolution: 1024x768
ossyNMMMNyMMhsssssssssssssshmmmhssssssso Terminal: /dev/pts/14
ossyNMMMNyMMhsssssssssssssshmmmhssssssso CPU: Intel Xeon E5430 (8) @ 2.660GHz
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ GPU: AMD ATI 11:0d.0 ES1000
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Memory: 5928MiB / 32091MiB
/sssssssshNMMMyhhyyyyhdNMMMNhssssssss/
+sssssssssdmydMMMMMMMMddddyssssssss+
/ssssssssssshdmNNNNmyNMMMMhssssss/
.ossssssssssssssssssdMMMNysssso.
-+sssssssssssssssssyyyssss+-
`:+ssssssssssssssssss+:`
.-/+oossssoo+/-.
2.1. Errors
Wrong username/password
If your username/password combination was wrong, you will get a permission denied message:
Permission denied, please try again. NID@eustis.eecs.ucf.edu's password:
Double-check that NID is your correct UCF NID username and that your password was entered correctly. Also make sure you are connecting to eustis.eecs.ucf.edu and not eustis3.eecs.ucf.edu (there should be no 3 after eustis in the server name).
3. Configure git
You only need do this once for the entire semester.
3.1. Set user name
Replace "John Doe" with your full name.
git config --global user.name "John Doe"
There will be no output. If you get any output, double-check the command and re-enter it.
Validation
git config --global user.name
The output should be the full name you put.
3.2. Set your email address
Replace "johndoe@example.com" with your ucf email address.
git config --global user.email johndoe@example.com
Validation
git config --global user.email
The output should be the email address you put.
3.3. Set your editor to emacs
git config --global core.editor emacs
Validation
git config --global core.editor
The output should be emacs.
3.4. Explicitly set the default branch name to master
This is the current default and what our grading tools will expect when pulling your projects.
git config --global init.defaultBranch master
Validation
git config --global init.defaultBranch
The output should be master.
4. Create your repository
You only need to do this once for the whole class.
4.1. Create a new directory
mkdir -p ~/cop3223fall26/assignments
The output should be nothing. Note that -p will create all directories in the path if needed. If the path exists, it will not throw an error. The tilde ~ is an alias for your home directory, which on eustis is /home/net/NID for your NID.
Validation
ls -d ~/cop3223fall26/assignments
The output should be ~/cop3223fall26/assignments
If you see the following
ls: cannot access '/home/net/NID/cop3223fall26/assignments': No such file or directory
then double-check your spelling and try creating the directory again.
4.2. Change the working directory to your new one
cd ~/cop3223fall26/assignments
The output will be nothing.
Validation
readlink -f ./
The output will be the full path to the current folder. Check it carefully. It should look like this:
/home/net/NID/cop3223fall26/assignments
If you get an error like the following,
-bash: cd: /home/net/NID/cop3223fall26/assignments: No such file or directory
then double-check your spelling and/or try creating the directory again.
4.3. Initialize the git repository
git init
The output should be
Initialized empty Git repository in /home/net/NID/cop3223fall26/assignments/.git/
Double check the folder path to make sure it is correct. If not try creating the directory again.
Validation
git status
the output should be
On branch master No commits yet nothing to commit (create/copy files and use "git add" to track)
The branch name should be master if not then go back to make sure git config is setup correctly.
Errors
If you see the following,
hint: Using 'master' as the name for the initial branch. This default branch name hint: is subject to change. To configure the initial branch name to use in all hint: of your new repositories, which will suppress this warning, call: hint: hint: git config --global init.defaultBranch <name> hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m <name>
then go back to make sure git config is setup correctly.
4.4. Add your first file
echo "my assignments" > README.md
You should see no output.
Validation
readlink -f README.md
The output will be the full path of the file. Look at it carefully. It should look like
/home/net/NID/cop3223fall26/assignments/README.md
Now enter
git status
The output will now show that README.md is untracked, i.e., it has not been staged and commited to the local repository yet. It is only in your working tree.
On branch master No commits yet Untracked files: (use "git add <file>..." to include in what will be committed) README.md nothing added to commit but untracked files present (use "git add" to track)
Errors
If you see the following,
fatal: not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
then you haven't yet initialized your git repository or you are not in the right directory.
4.5. Stage the file
git add README.md
The output should be nothing
Validation
git status
This should result in the following output, which tells you that the file is staged but not commited yet:
On branch master No commits yet Changes to be committed: (use "git rm --cached <file>..." to unstage) new file: README.md
Double-check that the name of the file is README.md.
Errors
If you see
fatal: not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
then you haven't yet initialized your git repository or you are not in the right directory.
If you see
fatal: pathspec 'README.md' did not match any files
4.6. Commit the file
Before committing, double-check that you configured your editor,
git config --global core.editor
The output should be emacs (or the editor you selected). If not go back and be sure that git config is setup correctly.
To commit the file:
git commit README.md
This will open up your editor automatically and present you with the following text
# Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch master # # Initial commit # # Changes to be committed: # new file: README.md #
The cursor will already be on the first line. Type your commit message, e.g., "Add a README.md file", so that your text now looks like this:
Add a README.md file # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch master # # Initial commit # # Changes to be committed: # new file: README.md #
Then save the file and exit the editor (in emacs this is Ctrl-x Ctrl-s then Ctrl-x Ctrl-c).
The output should be
[master (root-commit) 0721d93] Add a README.md file 1 file changed, 1 insertion(+) create mode 100644 README.md
0721d93 is the commit ID, which will differ for you.
See this description of good practices for writing commit message.
Validation
git status
The output should be
On branch master nothing to commit, working tree clean
Now enter
git show
The output should be
commit 0721d935b05f1e506621893a00afbd6a70b7d5c4 (HEAD -> master) Author: John Doe <johndoe@example.com> Date: Thu Dec 19 11:20:43 2024 -0500 Add a README.md file diff --git a/README.md b/README.md new file mode 100644 index 0000000..74788a2 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +git project
The commit ID, author, and date should differ, but otherwise be the same. This is the changelog you have created.
Now enter
git log
The output should be
commit 0721d935b05f1e506621893a00afbd6a70b7d5c4 (HEAD -> master) Author: John Doe <johndoe@example.com> Date: Thu Dec 19 11:20:43 2024 -0500 Add a README.md file
The commit ID, author, and date should differ, but otherwise be the same. This is the history of changes, which shows only the commit ID, author, date, and first line of the commit message. Since this is your first change, there is only one log entry.
Errors
If you see
fatal: not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
then be sure you have initialized your git repository and are in the right directory.
If you see
error: pathspec 'README.md' did not match any file(s) known to git
then make sure you have staged the file already.
If you see
Aborting commit due to empty commit message.
then make sure you have typed in the commit message and saved the file.
4.7. Add the submission repository URL
Type the following:
git remote add submission gitolite3@eustis3.eecs.ucf.edu:cop3223/$USER/assignments
The output should be nothing.
Validation
git remote -v
This should output the following
submission gitolite3@eustis3.eecs.ucf.edu:cop3223/NID/assignments (fetch) submission gitolite3@eustis3.eecs.ucf.edu:cop3223/NID/assignments (push)
except that NID should be your actual UCF NID, e.g., ab123456.
Errors
If you see
error: remote submission already exists.
then you have already added the remote. Double-check that it is the right repo url and the remote name (submission). If not, do the following to remove the submission url and re-add it.
git remote rm submission
then re-add the submission.
4.8. Set the upstream branch and push
git push --set-upstream submission master
You may see a request to check the host's fingerprint. You can say yes, although in general when connecting to a remote machine, you should independently confirm that the host's key matches the actual key on the server and that you trust the server.
Afterwards, the output should be something like this:
Welcome to eustis.eecs.ucf.edu. Please use your NID and NID password to log in. Your NID should be 2 letters followed by 6 digits. See http://t.cs.ucf.edu/help/eustis for additional instructions. Initialized empty Git repository in /home/gitolite3/repositories/cop3223/NID/assignments.git/ Enumerating objects: 3, done. Counting objects: 100% (3/3), done. Writing objects: 100% (3/3), 238 bytes | 238.00 KiB/s, done. Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 To eustis3.eecs.ucf.edu:cop3223/NID/assignments * [new branch] master -> master Branch 'master' set up to track remote branch 'master' from 'submission'.
This will push your local repository to the remote, grading repository URL. Additionally it will remember that your local repository's master branch is mapped to the submission repository's master branch, so you only need to the type git push for future submissions.
Validation
git status -sb
This should output the following
## master...submission/master
which confirms the mapping between your local repo and the submission repo.
Now enter
git branch -vv
The output should look like
* master 0721d93 [submission/master] Add a README.md file
The commit ID will differ, but this also shows the submission/master is the remote repo mapped from your local repo.
Errors
If you see a login prompt like this
Welcome to eustis.eecs.ucf.edu. Please use your NID and NID password to log in. Your NID should be 2 letters followed by 6 digits. See http://t.cs.ucf.edu/help/eustis for additional instructions. NID@eustis.eecs.ucf.edu's password:
then make sure you have added the submission remote repo correctly. Check that the server URL starts with gitolite3@ and not your own NID. Your own NID will be later in the URL after the cop3223/, but it won't be the username before the @ symbol.
If you still see the above error, you have double- and triple- checked the URL, copied instead of hand-typed it, editing only the NID part and confirming that it is your NID, especially if you joined the class after the semester started, then it may be that you have not been given access to git yet. Please contact the instructor.
If you see
fatal: 'submission' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
then make sure you have added the submission remote repo with the correct name submission.
error: src refspec maste does not match any error: failed to push some refs to 'master'
then make sure you have initialized your git repository.
If you see
fatal: No configured push destination. Either specify the URL from the command-line or configure a remote repository using git remote add <name> <url> and then push using the remote name git push <name>
then be sure you have already set the upstream.
If you see
To eustis3.eecs.ucf.edu:cop3223/NID/assignments ! [rejected] master -> master (fetch first) error: failed to push some refs to 'eustis3.eecs.ucf.edu:cop3223/NID/assignments' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
then have already pushed a local repository to the grading repo and are trying to submitting a new git repo. Please see these instructions to clone your existing repo and add whatever new changes you have.
If you see a request to enter your password, double-check your NID and that you have logged into eustis and not eustis3.
5. Making change logs
5.1. Edit your README.md file
emacs README.md
Make changes to the file, e.g.,
my assignments This is git repository contains my assignments.
Then save and exit (for emacs, Ctrl-x Ctrl-s then Ctrl-x Ctrl-c).
Validation
Type
git status
You should see the following,
On branch master Your branch is up to date with 'submission/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: README.md no changes added to commit (use "git add" and/or "git commit -a")
Double-check that you see "modified" for the file under "Changes not staged for commit". This means that your working tree has changed, but the changes aren't staged yet (or committed or pushed). In this state, your project has not been submitted and graders will not see what you see in your working tree.
Enter
git diff
The output should look something like the following (with different commit IDs):
diff --git a/README.md b/README.md index 74788a2..2f11c4f 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ git project + +This project will exercise the use of the git version control tool on the command-line.
This will show you the differences you have made in your working directory.
Errors
If you see
fatal: not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
then you haven't yet initialized your git repository or you are not in the right directory.
If you see
fatal: pathspec 'README.md' did not match any files
then you haven't created the file yet.
If you see
nothing to commit, working tree clean
5.2. Stage the file
git add README.md
The output should be nothing
Validation
git status
This should result in the following output, which tells you that the change is staged but not commited yet:
Your branch is up to date with 'submission/master'. Changes to be committed: (use "git restore --staged <file>..." to unstage) modified: README.md
Double-check that you see "modified:" with the filename under "Changes to be committed". p
Errors
If you see
fatal: not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
then you haven't yet initialized your git repository or you are not in the right directory.
If you see
fatal: pathspec 'README.md' did not match any files
5.3. Commit the file
Before committing, double-check that you configured your editor,
git config --global core.editor
The output should be emacs (or the editor you selected). If not go back and be sure that git config is setup correctly.
To commit the file:
git commit README.md
This will open up your editor automatically and present you with the following text
# Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch master # # Initial commit # # Changes to be committed: # new file: README.md #
The cursor will already be on the first line. Type your commit message, e.g., "Add a README.md file", so that your text now looks like this:
Add a repository description to README.md # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch master # # Initial commit # # Changes to be committed: # new file: README.md #
Then save the file and exit the editor (in emacs this is Ctrl-x Ctrl-s then Ctrl-x Ctrl-c).
The output should be something similar to
[master 886c6f7] Add a project description to README.md 1 file changed, 1 insertion(+), 1 deletion(-)
The commit ID will differ for you.
Validation
git status
The output should be
On branch master Your branch is ahead of 'submission/master' by 1 commit. (use "git push" to publish your local commits) nothing to commit, working tree clean
Notice that it says your branch is ahead of 'submission/master' by 1 commit. That means you have local change that are committed (i.e., no longer only in the working tree), but that are not yet synchronized with the remote grading repo.
Now enter
git log
The output should be
commit 886c6f73f32a6f283b9b0ff1a4a66d270926e1f0 (HEAD -> master) Author: John Doe <johndoe@example.com> Date: Thu Dec 19 12:01:26 2024 -0500 Add a project description to README.md commit 0721d935b05f1e506621893a00afbd6a70b7d5c4 (submission/master) Author: John Doe <johndoe@example.com> Date: Thu Dec 19 11:20:43 2024 -0500 Add a README.md file
The commit ID, author, and date should differ, but otherwise be the same. Notice there are two log entries, one from the initial creation of README.md and one from your new edit. Also notice that after the commit idea there is (submission/master) for the first commit (on the bottom), which tells you that this is the latest commit synchronized with the remote grading repository. The latest commit (on top) says (HEAD -> master) which tells you that this is the most recent change of your local repository. The next step will be to push, which will ensure that any local (committed) changes are synchronized to the remote grading repository.
Errors
If you see
fatal: not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
then be sure you have initialized your git repository and are in the right directory.
If you see
error: pathspec 'README.md' did not match any file(s) known to git
then make sure you have staged the file already.
If you see
Aborting commit due to empty commit message.
then make sure you have typed in the commit message and saved the file.
5.4. Push the new changes
git push
The output should be something like this (but with different commit IDs).
Enumerating objects: 5, done. Counting objects: 100% (5/5), done. Writing objects: 100% (3/3), 264 bytes | 264.00 KiB/s, done. Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 To eustis3.eecs.ucf.edu:cop3223/NID/assignments 0721d93..886c6f7 master -> master
This will push any new changes to your local repository to the remote grading repository URL.
Validation
git log
commit 886c6f73f32a6f283b9b0ff1a4a66d270926e1f0 (HEAD -> master, submission/master) Author: John Doe <johndoe@example.com> Date: Thu Dec 19 12:01:26 2024 -0500 Add a project description to README.md commit 0721d935b05f1e506621893a00afbd6a70b7d5c4 Author: John Doe <johndoe@example.com> Date: Thu Dec 19 11:20:43 2024 -0500 Add a README.md file
Notice that now the latest commit (on top) has, after the commit ID, (HEAD -> master, submission/master), which means that both your local repo master and the remote grading repo submission/master are synchronized to the latest change.g
The commit ID will differ, but this also shows the submission/master is the remote repo mapped from your local repo.
Errors
If you see
error: src refspec maste does not match any error: failed to push some refs to 'master'
then make sure you have initialized your git repository.
If you see
fatal: No configured push destination. Either specify the URL from the command-line or configure a remote repository using git remote add <name> <url> and then push using the remote name git push <name>
then be sure you have already set the upstream.
If you see
To eustis3.eecs.ucf.edu:cop3223/NID/assignments ! [rejected] master -> master (fetch first) error: failed to push some refs to 'eustis3.eecs.ucf.edu:cop3223/NID/assignments' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
then have already pushed a local repository to the grading repo and are trying to submitting a new git repo. Please see these instructions to clone your existing repo and add whatever new changes you have.
If you see a request to enter your password, double-check your NID and that you have logged into eustis and not eustis3.
6. Creating a feedback repository
This repository will allow teaching staff to provide the results from the grading of project and exercises. You will not be able to commit to this repository.
6.1. Create the feedback repository
git clone gitolite3@eustis3.eecs.ucf.edu:cop3223feedback/$USER/feedback ~/cop3223fall26/feedback
The output should be
Cloning into feedback... Welcome to eustis.eecs.ucf.edu. Please use your NID and NID password to log in. See http://t.cs.ucf.edu/help/eustis for additional instructions. hint: Using 'master' as the name for the initial branch. This default branch name hint: is subject to change. To configure the initial branch name to use in all hint: of your new repositories, which will suppress this warning, call: hint: hint: git config --global init.defaultBranch <name> hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m <name> Initialized empty Git repository in /home/gitolite3/repositories/cop3223feedback/USER/feedback.git/ warning: You appear to have cloned an empty repository.
where USER is your NID.
Validation
cd ~/cop3223fall26/feedback
git status
the output should be (when you first clone it)
On branch master No commits yet nothing to commit (create/copy files and use "git add" to track)
You may see
On branch master Your branch is up to date with 'submission/master'.
If you have already cloned it previously and received feedback already.
Double-check that your git repo name is correct. Enter the following
git remote -v
You should see
origin gitolite3@eustis3.eecs.ucf.edu:cop3223feedback/USER/feedback (fetch) origin gitolite3@eustis3.eecs.ucf.edu:cop3223feedback/USER/feedback (push)
Where USER is your NID.
Errors
- Recloned
If you see
fatal: destination path '/home/net/USER/cop3223fall26/feedback' already exists and is not an empty directory.
then you already cloned it (or have created the feedback directory without cloning). Check the validation to make sure you repo is there.
- Not yet cloned
If you see
-bash: cd: /home/net/USER/cop3223fall26/feedback/: No such file or directory
then double-check that you used the right folder name.
6.2. Receiving feedback
When you first clone your repo, there will be no commits to pull, so you won't receive any new commits.
cd ~/cop3223fall26/feedback
git pull
The output will be
Welcome to eustis.eecs.ucf.edu. Please use your NID and NID password to log in. See http://t.cs.ucf.edu/help/eustis for additional instructions. Your configuration specifies to merge with the ref 'refs/heads/master' from the remote, but no such ref was fetched.
Later, when there are commits, running git pull will receive new commits.
Check the contents of the directory for log files from automated grading runs.
Validation
Double-check that your git repo name is correct. Enter the following
git remote -v
You should see
origin gitolite3@eustis3.eecs.ucf.edu:cop3223feedback/USER/feedback (fetch) origin gitolite3@eustis3.eecs.ucf.edu:cop3223feedback/USER/feedback (push)
Where USER is your NID.
Errors
- Not yet cloned
If you see
-bash: cd: /home/net/USER/cop3223fall26/feedback/: No such file or directory
then double-check that you used the right folder name.
7. Creating a project directory
Log into eustis:
ssh NID@eustis.eecs.ucf.edu
Go to your local repository: Be sure you have already completed the git exercise before attempting this project.
cd ~/cop3223fall26/assignments
Create and enter a directory for the hello project:
mkdir hello cd hello
You only need to mkdir once to create the directory.
Make sure you are in the right directory
pwd
You should see
/home/net/NID/cop3223fall26/assignments/hello
8. Create the "hello, world!\n" program with emacs
Using emacs in eustis, record yourself using script (see instructions below) writing, compiling, and running a hello world program in C, i.e., a program that uses printf to write "hello, world!\n" to the console.
Make sure you are in the right directory
pwd
You should see
/home/net/NID/cop3223fall26/assignments/hello
8.1. Start recording
script -T hello.timing hello.script
8.2. Use emacs to create a hello world program called hello.c, then compile it and run it
emacs hello.c
Hand-type yourself do not use copy-and-paste the following C program that prints "hello, world!\n". Remember this is case sensitive and don't forget the \n (backslash n).
#include <stdio.h>
int main(int argc, char **argv) {
printf("hello, world!\n");
}
Then save and exit (for emacs, Ctrl-x Ctrl-s then Ctrl-x Ctrl-c).
Compile your program like this:
gcc -o hello hello.c
Then run your program like this:
./hello
You should see the following output.
hello, world!
8.3. Stop recording
exit
(or Ctrl-D on the empty command prompt.)
8.4. Verify that your recording works by replaying it yourself
scriptreplay hello.timing hello.script 2
Wait and watch a recording of your terminal session play. The 2 is optional and will replay it at 2x speed. You can use a higher number as well to replay faster. Use Ctrl-C to stop playback early.
9. Submitting your program via git
This assumes you have already setup your repository and that you are still in your hello directory in your repository.
9.1. Add and commit each file
Enter
git add hello.c git commit hello.c
Write an appropriate commit message. Remember that you will need to save (Ctrl-x Ctrl-s) then quit (Ctrl-x Ctrl-c) the emacs editor that pops up. If you are having trouble, be sure that you have completed the git project first.
Then enter
git add hello.timing hello.script git commit hello.timing hello.script
Enter an appropriate commit message.
Double-check that you have no uncommitted changes to hello.c.
git status
Do not commit the backup file hello.c~ nor the hello program.
You should see something like this:
On branch master
Your branch is ahead of 'submission/master' by 2 commits.
(use "git push" to publish your local commits)
Untracked files:
(use "git add <file>..." to include in what will be committed)
hello
nothing added to commit but untracked files present (use "git add" to track)
This means you have commits that haven't been pushed to the git server ("Your branch is ahead…") and that your working tree has no differences from your committed code ("nothing to commit…").
It's good practice to omit generated, binary files from source version control, such as your hello program binary. Source version control tools are geared towards source code, program binaries dramatically increase the size of the repository, and the program binary should be easily buildable from source.
You can ignore the hello program and emacs backup files by creating and committing a file called .gitignore, i.e., type in bash
echo -e "hello\n*~" > .gitignore git add .gitignore git commit .gitignore
Then type an appropriate commit message and exit the editor.
Type
git status
and you should now see
On branch master Your branch is ahead of 'submission/master' by 3 commits. (use "git push" to publish your local commits) nothing to commit, working tree clean
At this point, your working tree (where you are editing files) has no uncommitted changes, but the remote repo (where the instructor can access your repo) does not have your local commits yet. To push those changes type
git push
You should see something like
Welcome to eustis.eecs.ucf.edu. Please use your NID and NID password to log in. See http://t.cs.ucf.edu/help/eustis for additional instructions. Enumerating objects: 14, done. Counting objects: 100% (14/14), done. Delta compression using up to 8 threads Compressing objects: 100% (11/11), done. Writing objects: 100% (13/13), 2.69 KiB | 1.35 MiB/s, done. Total 13 (delta 1), reused 0 (delta 0), pack-reused 0 To eustis3.eecs.ucf.edu:cop3223/NID/assignments c048012..99b2200 master -> master
10. Self-check
10.1. Remove the previous self-check
If you have already run the self-check, you can remove it like this
rm -rf ~/tmp/assignments_selfcheck
Double-check the path carefully to avoid deleting the wrong directory.
10.2. Make a fresh clone of your project
git clone gitolite3@eustis3.eecs.ucf.edu:cop3223/$USER/assignments ~/tmp/assignments_selfcheck
You should see something like
Cloning into '/home/net/NID/tmp/assignments_selfcheck'... Welcome to eustis.eecs.ucf.edu. Please use your NID and NID password to log in. See http://t.cs.ucf.edu/help/eustis for additional instructions. remote: Enumerating objects: 16, done. remote: Counting objects: 100% (16/16), done. remote: Compressing objects: 100% (12/12), done. remote: Total 16 (delta 1), reused 0 (delta 0), pack-reused 0 Receiving objects: 100% (16/16), done. Resolving deltas: 100% (1/1), done.
If you see
fatal: destination path '/home/net/NID/tmp/assignments_selfcheck already exists and is not an empty directory.
10.3. Enter the fresh clone's directory
cd ~/tmp/assignments_selfcheck/
10.4. Double-check repository contents
Make sure you are in the right directory:
pwd
You should see
/home/net/NID/tmp/assignments_selfcheck
List the directory to make sure you see the README.org
ls
You should see (in no particular order):
README.md hello
which are the README.md file and the directory containing your hello, world!\n program files.
Enter the hello directory
cd hello
Be sure that you are indeed in the correct directory:
pwd
You should see
/home/net/NID/tmp/assignments_selfcheck/hello
Check that the directory contains the required files
ls -a
You should see the required files (hello.c, hello.script, hello.timing, and optionally .gitignore), ., and ...
. .. hello.c hello.script hello.timing .gitignore
The order does not matter
If you have hello or any other program binary, remove it with these instructions and rerun the self-check.
You can also validate what files are actually in the entire repo like this:
git ls-tree --full-tree -r --name-only HEAD
10.5. Make sure hello runs correctly
Be sure that you are in the correct directory:
pwd
You should see
/home/net/NID/tmp/assignments_selfcheck/hello
Try compiling and running your program.
gcc -o hello hello.c ./hello
This should output hello, world! (and exactly this; caps and the newline matter) on its own line, i.e.,
hello, world!
If you have a missing \n, you will see the command-prompt immediately after the text, e.g.,
hello, world!NID:~/cop3402fall25/hello$
If you see a missing comma, missing exclamation point, any capitalized letters, go back and follow the directions closely.
10.6. Make sure your terminal recording works
scriptreplay hello.timing hello.script 2
You should see a recording of yourself opening emacs, entering the hello world program, saving, and exiting.
11. Grading schema
| Criterion | Points |
|---|---|
| The git repo exists | 2 |
| The repo contains README.md | 1 |
| There are at least two log entries | 1 |
| The repo contains a hello/ directory with hello.c and required files | 1 |
| The repo does not contain hello or any program binaries | 1 |
| The replay shows using emacs to code | 1 |
| The program runs correctly | 1 |
| TOTAL | 8 |