Wednesday, February 15, 2017

All about version controlling tools - GitHub / bitbucket Part - 1

1. What is "version control", and why should you care?

"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"

As defined about, If multiple people are developing a software, the version controlling tools may come in handy. Let's get started.

2. Github

Once you have registered with GitHub you'll be able to create a repository easily. Repository is a place where you are going to upload the code into. 
In a repository there are branches. A branch represents an independent line of development. Branches serve as an abstraction for the edit/stage/commit process.

3. The branch structure

Master branch : This is where the production code goes into. After completion of an release of the program / software, we create a pull request( Simply allows the user to notify others about the completion. Then other users can review the code and merge the code ) to the master branch from developer and merge the code with the master branch after a code review.

Developer branch : This is where the non production code goes into. When the software is being developed, the users can merge their developments with this branch after creating a pull request.

Feature branch : These are the branches where features of the main software are developed in. When a developer completes a certain feature of the software, this branch will be merged with the developer branch.

Bug fix branch : All the bug fixing will be done using this branch. After fixing a certain bug, this branch will be merged with the developer branch after creating a pull request.

When you have all the above branches, your repo may look like this : 

|-- master
|-- developer
    |-- feature/toolbox
    |-- feature/custom-view-controller---ios
    |-- feature/floating-button---ios
    |-- bugfix/error-302-navigation-controller-error
    |-- bugfix/error-701-runtime-error---ios



Terms :
  1. Origin - origin is an alias on your system for a particular remote repository url. It's not actually a property of that repository.
    1. git add origin <url here>
  2. Remote - Remotes are simply an alias that store the url of repositories. You can see what url belongs to each remote by using.
    1. git remote -v
  3. Fork - It only allows clone on the server side.
  4. Upstream - The original repo

2 comments: