Full name email@address Deadline: 10.3.2024 Requirements: - You do not have to procotol absolutely everything, such as 'cd' commands, 'rm -rf' when the task tells you to do a 'rm -rf', 'vim file', etc. - Include output of commands only when explicitly requested. - Exact command for repeated actions (such as 'git commit -m') is needed only once. You can just state "(commit)" on further occurences. - You can write answers in Czech. Useful links and help: http://git-scm.com/doc 'git' - lists basic commands (you should not need any other commands here) 'git help ' - detailed syntax and options of a given command ----- Tasks ----- 1. Configure your identity (name, email) on the target machine, if you have not already. 2. Create your own private Git repository in a local project directory (working copy). 3. Next create a new file that contains a simple program computing factorials for numbers 1 to 10. You are free to use any other program with similar difficulty and length, in case you do not like to compute factorials, but then please adapt other tasks of the assignment (see below). The program should print each computed factorial on a separate line. Use your favorite programming language (C, Java, C#, Python, ...). Make the file tracked by Git. Save current version into the repository. 4. Split the program into two parts: (1) a library that contains the function for computing factorials and (2) a client that invokes the procedure. Use an approach typical for your favorite programming language. However, you have to create new file(s) to contain the new parts. 5. Ensure that new file(s), created in step 4, are tracked by Git and commit everything into the repository. 6. Remove the original file created in step 3 (make sure it is not tracked by Git anymore). Commit everything. 7. Create new branch with the name "oneline" and switch to it. 8. In your branch, modify the program to print all computed factorials on a single line. Commit everything properly. 9. Go back to the original branch (master). 10. Make the following two changes to the factorial program in the given order, but commit only the second modification. (i) Program should compute factorials for the numbers 1 to 15. (ii) Add new procedure that computes and prints squares of numbers 1 to 10. 11. Print the current status of the working copy and all uncommitted modifications. 12. Revert uncommitted modifications in the working copy. 13. Merge the branch "oneline" into the last version on the master branch. 14. Print short information about each commit. 15. Somehow move the local repository and working directory back to the state they were after task 9 (undo all changes done later). 16. Clone existing repository into a completely separate directory (new working copy). URL: https://gitlab.mff.cuni.cz/teaching/nswi154/cviceni2024.git Note that your Git client may use GUI to ask for the password, so it may not work when you do it in console remotely over ssh. You probably have to log in at least once through the web interface (https://gitlab.mff.cuni.cz) to ensure that your Git account is created. Let me know if you have any problems with accessing the repository (it works for me, but I cannot use it from a student account, obviously). 17. Modify content of the file main.c somehow. For example, add the code printing your name. 18. Print all modifications done in the working copy. 19. Update your working copy to match the current state of the remote public repository (at the server "gitlab.mff.cuni.cz"). Someone might have changed the remote repository in the meantime. 20. Publish your modifications in the remote repository (at the server "gitlab.mff.cuni.cz"). 21. Create new branch in your local repository (cloned from the server "gitlab.mff.cuni.cz") that starts in the version that was HEAD at the point of time when you cloned the original remote repository (gitlab.mff). Give unique name to your branch (to avoid conflicts with other students). Make some changes in the branch (e.g., add new files with some content) and commit them. 22. Merge the current HEAD of the master branch into your branch created in the previous task (everything just in the local repository). 23. Publish your branch to the remote repository. 24. Remove the whole directory "cviceni2024" that contains your local repository. Clone the existing repository again (like in the task 16). 25. List all the branches. Switch to your own branch that you created in the task 21. 26. Alternative solution for task 13 that will use rebasing. If you have not used "rebase" in task 13, then do it here. 27. Alternative solution for task 10 that does not use "git add -p" or "git add -i". Hint: use stashing if you have not done so already. 28. Extension of task 21: modify the last commit message (add some text). 29. Clone existing repository at the URL https://github.com/d3sformal/panda.git. Find the numbers (IDs) of all revisions created by me (try author names "Pavel Parizek" and/or "pparizek") since 1.7.2014. 30. Now consider the repository at https://github.com/d3sformal/yaga.git. Create the diff of all changes in the branch "feature/uf-plugin" since the date 1.6.2023. ------- Survey: ------- We use the survey to evaluate the labs (tasks) and homework assignments. It is completely voluntary, but useful for future tuning of the content and level of complexity of the labs. Most questions can be answered using the scale from 1 to 10. Write your answer under the corresponding question. (1) How new was the topic and content of the lab for you? (1 - brand new, 10 - I already knew everything) (2) Do you think that the content of this lab was useful? (1 - useless or too trivial, 10 - very useful) (3) How do you evaluate the level of complexity of the homework assignment? (1 - too trivial, 5-6 - just about right, 10 - too demanding or complex) (4) How do you evaluate your prior experience with the tool in the context of the homework assignment? (1 - I already know and can use everything, 10 - I tried everything practically for the first time) (5) How much time (in minutes) did you spend working on the homework assignment? (6) Additional space for your own comments on the lab and homework assignment: