Gitbash-NPZ

Tasks studies - laboratory


Project maintained by dawidolko Hosted on GitHub Pages — Theme by dawidolko

TASK02

Task 1.

Create a folder named after your name and surname, inside it there are local, local2 and remote folders.

Task 2.

Go to the local folder and create a new GIT repository there.

Task 3.

Go to the remote folder and create a clean remote repository with the command: git init —bare.

Task 4.

Go back to local and create a file called Cebula.txt and put the text in it (Polish characters are not necessary):

An onion is different.
It has no insides.
It is itself through and through, an onion
to the point of onionness.
Onion-like on the outside,
onion-like to the core,
an onion could look into itself
without being terrified.

Task 5.

Add a new file to the repository and commit with the description “onion”.

Task 6.

Set the ../remote folder as the remote repository.

Task 7.

“Push” the current version of the repository contained in the local folder to the remote one.

Task 8.

Declare GIT not to include .doc files in the repository and save this change with the description “ignore .doc”.

Task 9.

Create a garbage.doc file with the following content: “there’s nothing interesting here.”

Task 10.

Save the log of changes in the repository in the log.txt file, then add it to the repository and save it with the description “logs”.

Task 11.

Update the remote repository.

Task 12.

Replace the words “onion” with “carrot” in the Onion.txt file.

Task 13.

Generate a file called roznica.txt containing the differences from the original file.

Task 14.

Navigate to the local2 directory and clone the contents of the remote repository to it.

Task 15.

Add another verse to the Cebula.txt file (in the local2/remote directory):

There is foreignness and wildness within us
barely covered with skin,
inferno in us internal medicine,
violent anatomy,
and onion in onion,
not twisted gut.
She is naked many times,
profoundly similar.

Task 16.

Save the changes locally with the description “second verse” and then send them to remote.

Task 17.

Return to the local folder and save only the onion.txt file with the description “carrot” to the local repository.

Task 18.

Create a new branch “carrot”.

Task 19.

While still in master, send changes to remote - this requires resolving the conflict. The first verse with “carrots” and the second original verse are to remain in Cebula.txt. Leave the commit description as default.

Task 20.

Go to the newly created branch “carrot” and after the first stanza add a new line “Long live the carrot!”

Task 21.

Add the file roznica.txt and cebula.txt in the new version to the repository in a new branch with the description “carrot’s birthday” and send to remote.

Task 22.

Return to master branch.

Task 23.

What file is missing and why, place the explanation in the file wyjaszanie.txt and save it in the repository with the description “explanation”.

Task 24.

Unmerge the Cebula.txt file and return it to its state of two verses without carrots.

Task 25.

Add the third verse, save it and send it to remote:

Being consistent, onion,
successful onion creation.
In one simply the second,
in the larger one the smaller one,
and in the next another,`
that is the third and fourth.
Centripetal fugue.
Echo composed in a choir.

Task 26.

Go to the local2/remote folder and add “Ah, that onion!” at the end of the file.

Task 27.

Pack the entire folder named after your name and surname and upload it to Moodle.