Research About Git as a Version Management System
Version management system is a practice to track and manage the changes in a set of files. This might be any type of file. If any mistake is made, the older version of the file can be brought back by just simply reverting it.
An example of a simple version management system is copying files to another directory. But you can easily make errors by copying the wrong files or copying them to wrong directory etc. To avoid these errors and to make our life much simpler there are some softwares that version the files, version control systems. This helps the user to keep track of the files in a simple manner.
An image for local versioning system:
Most of us have heard GitHub before but do we know how it exactly works? Why is there such a website called https://github.com/ and is it so popular? What is Git, GitHub and relationship between them? Our purpose is to answer these questions and explain you Git in more detail.
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency as described in its website. A version control system records all the changes made to the files and enables going back and forward between these versions. It has lots of benefits which you can see below:
- Save Time
- Offline Working
- Undo Mistakes
- Track the Changes
There are a lot of version control systems such as SVN, Mercurial and Git. Git is the most popular between them. According to Stack Overflow developer survey, more than 70 percent of developers use Git, making it the most-used VCS in the world.
Git has some advantages over other VCS. Some of them are:
-
The branching and merging is easy and it is encouraged in Git. The branching and merging takes seconds. Since it is very fast we can have many branches which can be role-based(testing, development, release etc.), branches for every new feature or for just experimentation.
-
It has a staging area. Which is like a buffer that the commits can be reviewed and formatted before completing the commit. This enables staging only portions of the modified files.
- It is distributed meaning that every user clones all of the repository not just a branch. This enables that the every user has a backup of the shared repository. An image for distributed versioning system:
Configuring user information used across all local repositories
git config --global user.name “[firstname lastname]”
set a name that is identifiable for credit when review version history
git config --global user.email “[valid-email]”
set an email address that will be associated with each history marker
git config --global color.ui auto
set automatic command line coloring for Git for easy reviewing
The below image is am example of the Git system. It has bunch of commits and two branches(main and stable). Main is currently being used, HEAD. Also it has a staging part. It is also will be used as a reference for the other graphs:
- Green is for commits
- Orange is for the branches pointing to a commit
- Current branch is specified with HEAD
git config
Change user name or e-mail
git init
Initialize a local git repository in the current directory
git clone
Create copy of files in the given repository
git add
Add files to the staging area
git commit
Take a snapshot of project. It only takes files in staging area into consideration.
git status
Show the changed files
git push
Send changes to the connected repository
git pull
Take changes from connected repository
git branch
or git branch [branch-name]
Create a new branch
git checkout
Change the current branch
git merge
Merge current branch with a different branch
git diff
View the conflicts
git log
Show commit id and information
git reset
Change current branch to another commit
git rm [file]
Delete the file from project and stage the removal for commit
git mv [existing-path] [new-path]
Change an existing file path and stage the move
git log --stat -M
show all commit logs with indication of any paths that moved
git rebase [branch]
apply any commits of current branch ahead of specified one
git reset --hard [commit]
clear staging area, rewrite working tree from specified commit
GitFlow is a branching model for Git, created by Vincent Driessen. It has attracted a lot of attention because it is very well suited to collaboration and scaling the development team.
- https://git-scm.com/docs/gittutorial
- https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control
- https://git-scm.com/about/branching-and-merging
- https://git-scm.com/about/staging-area
- https://git-scm.com/about/distributed
- https://git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F
- https://www.freecodecamp.org/news/learn-the-basics-of-git-in-under-10-minutes-da548267cc91/
- https://www.javatpoint.com/git
- https://guides.github.com/introduction/git-handbook/#basic-git
- https://biz30.timedoctor.com/git-mecurial-and-cvs-comparison-of-svn-software/
- https://www.git-tower.com/learn/git/ebook/en/command-line/basics/why-use-version-control/
- https://www.atlassian.com/git/tutorials/what-is-version-control
- https://marklodato.github.io/visual-git-guide/index-en.html
- https://www.vogella.com/tutorials/Git/article.html
- https://confluence.atlassian.com/bitbucketserver/basic-git-commands-776639767.html
- https://education.github.com/git-cheat-sheet-education.pdf
- https://www.campingcoder.com/
- https://datasift.github.io/gitflow/IntroducingGitFlow.html
🏡 Home
- Research Similar Projects
- Requirements
- Questions
- Scenarios and Mockups
- Design
- Project Plan
- RAM
- API Documentation
- 451 API Documentation
- Manuals
- Reports
- Abdulkadir Elmacı
- Yağız Efe Şabanoğlu
- Erencan Uysal
- Hamza Akyıldız (451 Communicator)
İsmail Ata İnan (352 Communicator)- Merve Rabia Barın
- Onur Can Avcı
- Ramazan Bulut
- Umut Kocasarı