Gitbash-NPZ

Tasks studies - laboratory


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

TASK00

Task 1.

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

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 the local folder and create a file called River.txt and place the text in it:

In the river of Heraclitus
fish catches fish,
the fish cuts the fish with a sharp fish,
fish builds fish, fish lives in fish,
a fish escapes from a besieged fish.

Task 5.

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

Task 6.

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

Task 7.

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

Task 8.

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

Task 9.

Create a file junk.doc with the following content: “there is nothing interesting here”.

Task 10.

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

Task 11.

Update the remote repository.

Task 12.

Replace the words “fish” with “cod” in the River.txt file.

Task 13.

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

Task 14.

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

Task 15 .

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

In Heraclitus' river
a fish loves a fish,
your eyes - he says - shine like fish in the sky,
I want to swim with you to a common sea ,
the most beautiful of the school.

Task 16.

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

Task 17.

Go back to the local folder and save only the River.txt file to the local repository with the description “cod”.

Task 18.

Create a new branch “cod”.

Task 19.

While still in master, send changes to remote - this requires a solution conflict. The first verse with “cods” and the second one will remain in Rzeka.txt original verse. Leave the default commit description.

Task 20.

Go to the newly created “cod” branch and add a new one after the first verse the line “Cod went to the solarium!”.

Task 21.

Please add the file roznica.txt and Rzeka.txt in the new version to the repository in a new branch with the description “solarium” and send to remote.

Task 22.

Return to the master branch.

Task 23.

What file is missing and why? Place the explanation in the wyjaszanie.txt file and save to the repository with the description “explanation”.

Task 24.

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

In the river of Heraclitus
Fish invented fish of fish,
The fish kneels before the fish, the fish sings to the fish,
He asks the fish to swim easier.

Task 25.

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

Task 26.

Please upload the packed folder with your name and surname to the website moodle