help a software team manage changes to source code over time. Version control software keeps track of every modification to the code in a special kind of database. If a mistake is made, developers can turn back the clock and compare earlier versions of the code to help fix the mistake while minimizing disruption to all team members. What is version control
we require access to a Git-based hosted service. • GitHub • Bitbucket • GitLab • Microsoft Visual Studio Team Services Git can be accessed and managed using command line tools. There are graphical User Interface (GUI) clients such as • Git extensions • Source tree • Tortoise Git
not necessary to have a central location to store all the versions of a project, instead developers and programmers copy (called clone) the main project to their local hard drive, so everyone has a physical mirrored copy of it to work on.
with content to append ======= totally different content to merge later >>>>>>> new_branch_to_merge_later $ git merge new_branch_to_merge_later Auto-merging merge.txt CONFLICT (content): Merge conflict in mer ge.txt Automatic merge failed; fix conflicts and then commit the result. File > < terminal
from the main working project. Repository A repository is a folder whose contents are tracked by git. It is also known as a repo, in simple terms. Master The primary branch of all repositories. All committed and accepted changes should be on the master branch. You can work directly from the master branch, or create other branches. Clone A clone is a copy of a repository or the action of copying a repository. Commit Adding/saving the changes to the local repository
most current commit of the repository in which you are working. When you add a new commit, HEAD will then become that new commit. Push Updates a remote branch with the commits made to the current branch. You are literally “pushing” your changes onto the remote. Rebase When rebasing a git commit, you can split the commit, move it, squash it if unwanted, or effectively combine two branches that have diverged from one another. Merge Taking the changes from one branch and adding them into another (traditionally master) branch.