Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 50 additions & 1 deletion task-1/setup.sh
Original file line number Diff line number Diff line change
@@ -1 +1,50 @@
# Write your code here
# Write your code here
echo "Creating project..."
mkdir project
cd project
git init
touch README.md
mkdir resources
touch settings.conf
mkdir src
cd resources

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of cd-ing into the directory, you can also create/access files by using a path, e.g.:

touch resources/xyz.txt

touch family picture.jpg
touch icon.png
touch logo.png
cd ..
cd src
mkdir database
mkdir profile
touch program.java
cd ..
git status
git add .
git commit -m "Initial commit"
git push

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This push is not asked for in the instructions. As it stands, it produces an error message because no remote repository has been defined:

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>

sleep 3
echo "Setup project..."
echo "Welcome to my project" > README.md
cd src
rm -r profile
cd ..
cd resources
rm "family picture.jpg"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, you have correctly used quotes for the file name containing a space. However, that file was not created. Hence, the error message:

rm: cannot remove 'family picture.jpg': No such file or directory

cd ..
git status
git add .
git commit -m "write welcome text to README, remove profile directory , remove family_picture.jpg"
git push

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the push

sleep 3
cd resources
echo "Setup javascript..."
mv program.java program.js
echo "console.log('JavaScript works!');" > program.js
node program.js
cd ..
git status
git add .
git commit -m "rename program.java to program.js , add log line to program.js"
git push
cd ~
ls -la
echo "All done!"
3 changes: 2 additions & 1 deletion task-2/github-username.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
<paste here your github username>
<halyna1995>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, when you see a comment in angle brackets, you should replace the whole comment, including the angle brackets with your replacement.

Suggested change
<halyna1995>
halyna1995

https://github.com/halyna1995/halyna1995/blob/main/README.md