App Academy

0/4 Git Assessment

Learning Challenge

Git Assessment

Question

I received a 0/4 on the assessment but not sure what I’m doing wrong here any help would be appreciated!

’drawings’ branch

fatal: ambiguous argument 'student/drawings': unknown revision or path not in the working tree.Use '--' to separate paths from revisions, like this:'git <command> [<revision>...] -- [<file>...]'

’master’ branch

fatal: ambiguous argument 'student/master': unknown revision or path not in the working tree.Use '--' to separate paths from revisions, like this:'git <command> [<revision>...] -- [<file>...]'

’pictures’ branch

fatal: ambiguous argument 'student/pictures': unknown revision or path not in the working tree.Use '--' to separate paths from revisions, like this:'git <command> [<revision>...] -- [<file>...]'

’together’ branch

fatal: ambiguous argument 'student/together': unknown revision or path not in the working tree.Use '--' to separate paths from revisions, like this:'git <command> [<revision>...] -- [<file>...]'
```</strong>
### What I've tried

### Screenshots
![2021-03-29 (2)|690x347](upload://7KJ8Ageg6zyFPnOobtoLh1pQLF8.png) 
![2021-03-29 (3)|690x340](upload://uB7feYsjtkNkBEvvHWiQwOeEX4W.png)

Hi Alex,
Can you resend the screenshots? I am unable to see them because they are posted in the code snippet.
Jesse

Hi Alex,
I was able to pull up your latest submission to see what was going on. It looks like these fatal errors were caused by an unusual directory structure in your project.

When I pull up student submissions, this is the file structure that I should see:
image

When I pulled up your submission, this is the structure I found:

You seem to have two git-repo-management directories nested inside one another, which is causing the fatal error.

Looking more closely at your submission, it looks you also have merge conflicts in the master and together branches.

My recommendation is to fix your file structure so it matches the top screenshot in this post, and then go into the master and together branches to fix the conflicts before re-submitting.

Let us know if anything else comes up!
Jesse

1 Like

Thank you Jesse for the feedback. My file structure seems to layout like that upon download of the project. After downloading and deleting the zip file. I type in Unbuntu cd /mnt/a/git-repo-management there is already a directory for the second git-repo-management. Anyway to prevent this?

Hi Alex,
I’ve pasted a portion of the directions below. I suspect you may have run into issues with the section in bold:

Right click on the ZIP file and choose “Extract All…”.
In the “Files will be extracted to this folder” text box, delete the “git-repo-management” from the path.
Then, click the “Extract” button.

Missing this step would likely cause the nested folders that you have run into.
Jesse

We were able to adjust your score for this Git attempt to 2/4. Here is the diff from running the tests manually:

drawings
---DELIMETER---
master
--- a/site.html
+++ b/site.html
@@ -6,11 +7,17 @@
+
-  <img src="images/drawings/joseph-roulin.jpg">
+<<<<<<< HEAD
+  <img src="images/drawings/lands-end.jpg">
+  <img src="images/drawings/joseph-roulin.jpg">
+=======
+>>>>>>> pictures
+
---DELIMETER---
pictures
---DELIMETER---
together
--- a/site.html
+++ b/site.html
@@ -6,12 +7,17 @@
+
-  <img src="images/drawings/joseph-roulin.jpg">
+<<<<<<< HEAD
+  <img src="images/drawings/joseph-roulin.jpg">
+=======
+>>>>>>> pictures
+
---DELIMETER---

After fixing these issues, make sure you follow the directions closely so that your zip file has the right contents (pasted below):

On Windows:
In your Downloads directory, right click or two-finger tap the "git-repo-management" directory.
Choose "Send to" > "Compressed (zipped) file".
Upload the "git-repo-management.zip" file.

Thank you for your speedy feedback Jesse. I was going to start the assessment from scratch again as well. I’m assuming the - in the master branch and together branch is because of a merge conflict. I went into the terminal and resolved the merge conflict in the master branch only then switched to the together branch and when I typed “git status” the message says the working tree is clean. Is the conflict resolved only through the master branch?

Hi Alex,
In the diff, the unresolved merge conflict impacted both branches. I would recommend opening your file and checking the code in both branches - if the list of images in each branch looks correct (without all of the extra characters from the merge conflict) then you can be confident it was addressed in both branches.
Jesse


hi jesse i’m just a bit confused on the line that says “added by them: drawings/lands-end.jpg”

Hi Alex,
This message has to do with your merge. One of the branches had the lands-end in the images directory, and another branch had it inside the drawings directory inside the images directory. So the message you are seeing id showing that there is an incoming change related to the path due to the merge.

is this an issue for the “Fix the conflict by removing the “lands-end.jpg” from the file system” step of the assessment?