GIT - Version Control
Be Part of a team
Last updated
Be Part of a team
Last updated
Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. Versioning of files/projects.
Curious on your own, go through this git handbook.
There are different types of version control systems. Distributed Version control system remote repository which is stored in a server and a local repository which is stored in the computer of each developer. This means that the code is not just stored in a central server, but the full copy of the code is present in all the developers’ computers. Git is a Distributed Version Control System since the code is present in every developer’s computer.
Yes, you do. Real time projects worked on in parallel teams will always require you revert back and forth to an older version of your code. Also it independence through branching, hence you can comfortably work on your task in a team without much conflicts. Don't worry you will understand with time
Git is the most commonly used version control. Git is an example of DVCS - Distributed Version Control System
. Experienced software developers understand how to use git well, it's a well represented field.
Git features performance, security and flexibility.
It's good to use git while you have an account at Github (remember the "server"). Go ahead and signup on github.com
Download https://git-scm.com/download/win and install it. Read about git for windows.
After installation, open git. Also you can create a folder for your projects, right click on it, click on git bash
to execute git. Configure according to your credentials below.
On your terminal, run this
Configure according to your credentials below.
The easiest way to install is to install xcode. Check if you have git, if you don't it will prompt you to install xcode.
Configure according to your credentials below.
You have to identify yourself to git. Remember your github credentials, time to use. On git bash, type the following with your credentials.
To check your credentials
Git uses linux commands.
Two ways:
Create a project(repo) on Github
A repository(repo) is like a folder for your project. Login to your Github account and follow the steps below:
2. Initialise a project locally
Let's say you had an existing project locally and want on Github for some reason. Steps:
Now that you've understood all the above, it's now time to understand key concepts in Version Control. These entails:
Branching
Merging and merge conflicts
Commit History
Github Pages
Rebase
Squash
This is an important aspect when it comes to code collaboration. It allows you to test out what your working on independently while in a team. Create your own branch and later that branch will be combined with the major team branch
Master
branch is always created by default by github.
Base branch
is the default branch.
To create your own branch , make sure you are in a base branch, then in terminal/gitbash
Make changes to your code and then push them to github. There will be no effect on the base branch until merging is done.
Want to learn more, go through this git handbook.
I believe you have learnt something about project collaboration. Let's see what you have got.
Create your own branch
You made it. Good Job. Do more practices. Happy git-ting
Create a some new files, you can write anything in the files