1. Create a file readme.txt in lab#_rollno.1_rollno.2_rollno.3_rollno.4 directory, which contains contribution of each team member and references (cite where you get code/code snippets from).
e.g.lab3_154054002_154054005_154054001
2. Rename the directory lab#_rollno.1_rollno.2_rollno.3_rollno.4 to actual lab number instead of #, replace the rollno.N with your respective roll numbers.
1. Most of you must have written a lot of code by now (remember CS101?) and some of you must have made files like - binary_search.cpp, binary_search_new.cpp, binary_search_final.cpp, binary_search_final_new.cpp and so on. Now, when you want to want to work on some code, say, after a month, you have no idea what you wrote in each of the files. So you will have to go through them manually. This is where Version Control steps in. Git is an example of a DVCS (Distributed Version Control System) which tracks your “content” rather than files. This allows for efficient maintenance of your code. This is very useful if you are working on a huge code base and code quality and maintenance is a must (you will realise more about the importance when you contribute to a big code base).
Let’s get started.
The basic git cycle: add, commit, push
A coder who uses git usually uses these 3 commands - add, commit, push
To provide an analogy, let’s say you are taking a family photograph. There are many people in the frame. You tell them to stand at different places so that everyone is in the frame. Then you figure out that the taller people are better off standing at the back. Then you make some more adjustments to their positions. These ``changes’’ that you make are equivalent to the ``add’’ command. You make some changes to the files, and then you ``add’’ those changes.
Then, you take a photograph. The photograph is the snapshot of the current orientation of the folks present in the picture. This is equivalent to a ``git commit’’ which is nothing but essentially a snapshot of your code, which you can access any time.
But where do you push your code? In git, you have the concept of a remote. A remote is a handler to your online repository where you can update your changes or fetch the updates made by other collaborators of your projects. Think of it as an actual remote, with just 2 buttons (there are more though) - push and pull. The push button ``pushes’’ your code to the online repo, and the pull button ``pulls’’ the latest version of your code to your local repo.
Finally, after taking some good photos, you upload them on your favorite Social network. This is equivalent to a ``git push’’, where you upload your commits to an online service, like GitHub or BitBucket.
But wait, before doing all this, you need to switch on your camera!! This is where the ``init’’ command comes in, which tells git to start keeping track of the files in the current directory. Ideally, you should set up a remote immediately after initializing a repo. Google up on how to do that!
For this assignment, we will loop around the basic git cycle, and then some more.
Problem 1:
-----------------------
We will be using https://git.cse.iitb.ac.in (yes, CSE has an online service for making online repositories) for this assignment. You have to make a single repository (one repo per team) and name it gitlab-inlab (and make it Public so that we can see it).
Now, one team member who creates the repository has to create a new directory, and then initialize a new git repository (see git init). Then, create a repository named lab1 and keep your lab1 work in the directory (the contents need not be exhaustive, but do keep some files and directories in the directory lab1). Commit your changes, and push them into the online repo. Now, the other members have to clone the repository, make new directories named lab2 and lab3, and add some files to it. The final structure should be as given in this link: https://git.cse.iitb.ac.in/rohitrango/CS251-demo. Check them commits section to see the different commits. There must be at least one commit each by each team member.
Note: If you are a team of two or four, your structure can be a bit different, but do make sure that all members of the team have at least one commit each.
---------------------------------
Problem 2
---------------------------------
You are given a pdf file which was created using Latex. You need to replicate the same document in pdf format using Latex and make sure you try to replicate all the styles, sizes, fonts, etc. used in the document provided.
You can change the text, for example, The name in the title of the document, the names present anywhere else in the document, and/or anything which you would like to replace. But the format of the document, including the Table of Contents, sections, subsections, bold/italic/emphasised fonts, and so on should be replicated as it is.