Honors Exp1 159
Honors Exp1 159
Honors Exp1 159
DEPARTMENT OF INFORMATION
TECHNOLOGY
EXPERIMENT NO. 1
CO/LO: Apply DevOps principles to meet software development requirements.
A Version Control System is a tool you use to track, make, and manage changes to your
software code. It's also called source control.
A version control system helps developers store every change they make to a file at different
stages so they and their teammates can retrieve those changes at a later time.
This means that you might lose the system file or accidentally forget the directory/folder of the
file you are working (and then write in another directory).
Despite the helpful collaboration and communication between developers, if a server goes
down for few seconds or gets corrupted, there's the chance you'll lose your work.
Unfortunately, this is a very big problem with the CVCS.
Academic Year: 2023 - 2024 SAP ID: 60003210159
In a DVCS all developers have a full back up (clone) of all the data in the server. This means
that whenever the server is down or faulty, you can still work on your project and you can copy
or back up your repositories to the server to restore them.
When you're using a DVCS, many developers can work together on a project. One popular
DVCS is Git, which we'll talk about more now.
What is Git?
Git is a free open source distributed version control system you can use to track changes in
your files. You can work on all types of projects in Git, from small to large.
With Git, you can add changes to your code and then commit them (or save them) when you're
ready. This means you can also go back to changes you made before.
What is GitHub?
GitHub is a web interface where you store your Git repositories and track and manage your
changes effectively. It gives access to the code to various developers working on the same
project. You can make your own changes to a project at the same time as other developers are
making theirs.
If you accidentally mess up some code in your project while making changes, you can easily
go back to the previous stage where the mess has not occurred yet.
With GitHub, you can easily track and manage the changes you have made and check on the
progress you've made in your project.
Academic Year: 2023 - 2024 SAP ID: 60003210159
Teams are able to stay on the same page while working on a project together and can easily
organize and manage the project effectively.
Implementation:
After the installation, you'll want to make sure that Git is successfully installed on your system.
Open your command prompt or Git bash (whichever one you choose to use) and run the
command:
Academic Year: 2023 - 2024 SAP ID: 60003210159
git --version
If Git was successfully installed on your computer, it should display the current version of Git
below the command you just ran. If the current version is being displayed, congratulations!
To configure Git, we need to specify the name, email address, and branch by using the git
config --global command. For example:
From the image above, we used git config --global user.name to configure the username. In my
case I used my name “Aditya Surve”. The same applies for the git config --global user.email.
Git comes with a default branch of master, so I changed it to be called the main branch by using
the git config --global init.default branch main command.
Now you're ready to start using Git.
When the sign up form opens up, enter your email, create a password, enter your username,
and then verify your account before clicking on the create account button.
• git config
• git init
• git add
• git commit
• git clone
• git push
• git rm
• git branch
Let's go through each of these briefly so you know how to use them.
Academic Year: 2023 - 2024 SAP ID: 60003210159
For example:
git init
When you run this command, you should see a folder named .git being created automatically
in the current folder you are working on.
Conclusion:
In this practical I learned what version control systems are all about. I also learned how to
install and setup Git on your computer and setup a GitHub account. Lastly, I went through some
commonly used Git commands.
References:
1. How to Use Git and GitHub – Version Control Basics for Beginners (freecodecamp.org)
2. Version Control Systems - GeeksforGeeks
3. VCS Program Details - Verra