Gitbash-NPZ

Tasks studies - laboratory


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

TASK01

Task 1.

Create a folder on your desktop with your name and place 3 directories in it: global, local and local2.

Task 2.

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

Task 3.

Go to the global folder and create a new global/remote repository there using the git init –bare command.

Task 4.

Return to the local folder and create a text file locomotive.txt in which to place the text:

A locomotive stands at the station,
Heavy, huge and sweat dripping from it:
Fatty oil.
It stands and gasps, pant and blows,
The heat from its heated belly puffs:
Puff - how hot!
Ugh - how hot!
Puff - how hot!
Phew - so hot!
He can barely breathe, he can barely breathe,
And the stoker pours coal into it.

Task 5.

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

Task 6.

Set the global folder as a remote repository.

Task 7.

“Push” the current version of the repository located in the local directory to the global repository.

Task 8.

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

Task 9.

Create a file junk.docx with the content: “there is 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.

In the file lokomotywa.txt, replace all words hot with cold.

Task 13.

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

Task 14.

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

Task 15.

Add another verse to the locomotive.txt file (in the local2/global directory):

They hitched up wagons to it
Large and heavy, made of iron and steel,
And every wagon was full of people,
And in one there were cows, and in the second there were horses,
And in the third there were only fat people,
They were sitting and eating fatty sausages,
And the fourth wagon was full of bananas,
And in the fifth there were six pianos,
In the sixth there was a cannon - oh! how big!
An iron beam under each wheel!
In the seventh there were oak tables and wardrobes,
In the eighth there was an elephant, a bear and two giraffes,
In the ninth - only fattened pigs,
In the tenth - trunks, crates and crates.
And there were about forty of these wagons,
I don't know what else could fit in them.
But even if a thousand athletes came
And everyone would eat a thousand cutlets,
And everyone, I don't know how they exerted themselves,
They can't bear it, it's such a burden.

Task 16.

Save the changes locally with the description “second stanza” and then send them to global.

Task 17.

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

Task 18.

Establish a new branch “cold”.

Task 19.

While still in master, please send the changes to global - this requires resolving the conflict. The first stanza with the word “cold” and the second original stanza are to remain in lokomotywa.txt. Please leave the commit description as default.