0% found this document useful (0 votes)
38 views5 pages

Version Control: Why Git?

Version control is used to track changes made to source code. Git is a version control system that stores changes in a series of small files rather than full file versions. It allows easy retrieval of past versions and collaboration on projects. The developer used Git and GitHub for an online donation site, creating repositories and branches for different team members to work on. They resolved conflicts by discussing changes and choosing head or origin versions. Testing was done to check functionality and other attributes like portability and behavior.

Uploaded by

Aman Kumar Dev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views5 pages

Version Control: Why Git?

Version control is used to track changes made to source code. Git is a version control system that stores changes in a series of small files rather than full file versions. It allows easy retrieval of past versions and collaboration on projects. The developer used Git and GitHub for an online donation site, creating repositories and branches for different team members to work on. They resolved conflicts by discussing changes and choosing head or origin versions. Testing was done to check functionality and other attributes like portability and behavior.

Uploaded by

Aman Kumar Dev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Version Control

In the process of developing software, it is important to track the software. In order to do that,
version control is needed. Version Control is a tool that keeps the track of any changes made in the
source code of a software and back up the changed and existing source code. Because of this, it is
easier to go back to the changes if the code from the past is required. Also, working with the version
control simplifies the overall working and managing of codes and projects even if there is multiple
people. There are many version control systems like git, mercurial, darcs and many more. (Git - Abo
ut Version Control 2019)

Git
Git is a one of the version control system but it is quite different from the other VCS. Other version
control system saves the changes in the file based. The information of the file and its changes made
over the time are stored in the separate file which is commonly known as delta-based version
control. But in the git, the file is stored in a series of any small files. If there is any changed made to
the file, it stores the changed file but if the file is not changed at all, then file is not saved in that
version at all. Because of this, git is an effective tool for a version control system. (Git - What Is Git? 
2019)

Why git?
Unlike Microsoft word, git remembers every commit done so that it can be available to you if you
need it in near future. No matter the number of commits, it will remember everything as long as you
have committed any changed made. And if you to go back to your previous version, with the help of
git. Not only that, git simplifies the work of the complex project when working with multi people.
Every file is managed and it is easy to collaborate on projects. Git is an open source as well making
it free to use and anyone can contribute to the any high project. Not only that, even every company
uses git for the complex projects and it is quite necessity to use git as well. (New Developer? You Sh
ould’Ve Learned Git Yesterday. 2019)
Git process

Figure 1: Git process

As the figure show above, the folder is initiated at first using the git command “git init”. When
production is started in that folder, it is than file is added to the staging area using “git add
[filename]”. To add all file at once, “git add .” is used. After that, git commit is used to move file from
staging area to local repo. In order to do that, “git commit -m ‘[message here]’ ” is used whereas -m
is a message to the commit. After that, git push command is used to move the local repo file to
remote repo like GitHub or bitbucket. With git push -u origin is used where -u denotes the upstream
and origin is the base link to the remote repo and branch name is used to push the repo file to
remote repo branches.

Other common git commands that are used during the process of the development of online
donation site are as follows:
1. Git clone: It is used to clone/download repo from the GitHub.
2. Git reset: It is used to unstage the file that has been already added to the staging area.
3. Git status: it is used to check the files that has been committed.
4. Git log: it is used to show all the version history of a current branch.
5. Git branch: it is used to show all the branch.
6. Git checkout: it is used to move to another branch from the current branch.
7. Git merge: it is used to merge the branches.
8. Git pull: it is used to fetch all the files from remote repo.
How have you used git and GitHub?
For the development of our online donation site, we have used git as our version control system
whereas we have used GitHub for storing all the source code in the repository. In GitHub, new
repository is created and teams are added to the repository by a scrum master. After that,
developer and tester and CICD pulls the repo. Our team have used tortoise git as a tool to interact
with the GitHub and git VCS. With the help of that, new branches are created and different member
works on different branch. After the work is completed, the developer of our team does a pull
request and QA reviews the code and comment done in GitHub and if there is anything wrong, he
simply comments out the problem and cancels the pull request. But if there is no problem and code
has met it’s standard, then he accepts the pull request and merges with the master branches.
Because of this process, the git helps to solve the problem in the code integrations.
But this not always the same case, sometimes when the same piece of code is changed by a two or
more developer, there will be a conflict within them, And to resolve that, the developer has to
discuss with each other and resolve using with either head or origin whereas head is a code of a
developer and origin is a code that is already in a repository of a GitHub.
Testing
Testing is the process of analyzing and evaluating a software to see if the software performs the
required task or not. It is done to check if the software that is developed does what it is intended to
do. Nowadays, testing is not done for the functionality, but also it is done to check the portability,
behavior, feature and many more.
References
Git - About Version Control (2019) available from <https://git-scm.com/book/en/v2/Getting-Starte
d-About-Version-Control> [30 October 2019]

Git - What Is Git? (2019) available from <https://git-scm.com/book/en/v2/Getting-Started-What-i


s-Git%3F> [2 November 2019]

New Developer? You Should’Ve Learned Git Yesterday. (2019) available from <https://codeburst.io/n
umber-one-piece-of-advice-for-new-developers-ddd08abc8bfa##targetText=Git%20simplifies%20
the%20process%20of,files%20at%20the%20same%20time.> [2 November 2019]

You might also like