Tasks studies - laboratory
Create a folder named after your name and surname, with a folder inside it local, local2 and remote.
Go to the local folder and create a new Git repository there.
Go to the remote folder and create a clean remote repository with the command: git init –bare
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.
Add a new file to the repository and commit with the description “fish”
Set the ../remote folder as the remote repository.
“Push” the current version of the repository contained in the local to folder remote repository.
Declare Git not to include .doc files in the repository and save this one change with the description “ignore .doc”.
Create a file junk.doc with the following content: “there is nothing interesting here”.
Save the log of changes in the repository in the log.txt file and add it to repository and save with the description “logs”.
Update the remote repository.
Replace the words “fish” with “cod” in the River.txt file.
Generate a file called roznica.txt containing the differences from the original file.
Change to the local2 directory and clone the contents of the remote repository to it remote.
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.
Save the changes locally with the description “second verse” and then send them to the remote.
Go back to the local folder and save only the River.txt file to the local repository with the description “cod”.
Create a new branch “cod”.
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.
Go to the newly created “cod” branch and add a new one after the first verse the line “Cod went to the solarium!”.
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.
Return to the master branch.
What file is missing and why? Place the explanation in the wyjaszanie.txt file and save to the repository with the description “explanation”.
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.
Go to the local2/remote folder and add “Ah, that fish!” at the end of the file.
Please upload the packed folder with your name and surname to the website moodle