Wednesday, May 31, 2017

Git for Beginners - Part 1 - Introduction to Git


When we learn about Git, first of all, we need to know what is Version Control System (VCS).   
So what is VCS?
                Version Control is a System that records changes to a  file or set of files over time so you can recall specific versions later.

Why we use Version Control System??

         - Made a change to the code and need to revert back to a known better state.
         - Have to maintain multiple versions of the software.
         - Wanted to see the difference between two revisions.
         - Wanted to test if a particular version is broken or fixed.
         - Wanted to see how long a bug existed for.
         - Wanted to experiment without interfacing with working code.

Git is a distributed version control and file management system.
  • distributed version control means if there is a project that has more than one developer, they all have an own copy of the project. Therefore every developer can work offline and it becomes very fast.
  • file management system means every developer can modify their own copy of the project. At last separate code will be merged together and get a finished product.
Follow picture shows an overall idea of Git data flow.



Now let's see what is above stages in brief.


      1.  Working directory:-  

          This is stage you are working. Here you will implement or modify your files. If you are satisfied with your implementation, you can take a snapshot or commit.  So then later you can revert back and change in this working directory if you are not satisfied with your changes in your files.

      2. Staging Area (Index) :- 

          If you want to save your source code in Git you want to promote or add your files to this staging area. This is some kind of a cache to save all your data in the working directory. 

      3. Local Repository:- 

          Once you all files are added to the staging area, you can snapshot or commit. So you can save your files in your local repository. Once that is done, the staging area is wiped clean. So if you wanna snapshot, you have to do this every single time.


      4. Remote Repository:-
  
          Above three steps are exist on your local machine. The remote repository is the place where all the developers gather who are contributing to your project. From all these files you can get the best product.


I will show you how to work with every stage deeply in coming tutorials. In next tutorial, I will show you how to install Git for popular operating systems.









Wednesday, May 17, 2017

Dual-boot Ubuntu 16.04 and Windows 10 on a PC




This post shows how to dual boot Ubuntu 16.04 and Windows 10 on a machine with UEFI firmware.




For this article, we will be creating three partitions for Ubuntu 16.04

  1. The root partition. ('/')
  2. The home partition ('/home')
  3. The swap area. ('swap')
First, check your computer is compatible with UEFI. In the search box at the bottom of the screen type 'System Information' and when the icon appears at the top click on it.





Then you can find the BIOS Mode of your computer.



Normally you do not need to disable Secure Boot. But if you have an OEM (store-bought) machine that comes with Windows 10, you might want to disable Secure-Boot.

First, you have to shrink one of your drive partitions to make room for installing Ubuntu 16.04. Therefore go to Disk Management and shrink one drive partition and make an allocated space. 


 


You can download Ubuntu 16.04 using this link. Then boot your pen drive or burn it to a blank DVD. Finally, insert the installation media into the appropriate location and reboot the machine.


When reboot process is happening, go to boot manager and select 'Brand name of your pen drive' + 'in UEFI mode'.  Then select install Ubuntu. You can select 'Try Ubuntu', play around with Live desktop, and if you are satisfied, run the installer by clicking on its icon on the desktop.


The first few steps ask basic strategies from you. click through first few steps and you will be found Installation type.






You will have to select Something else option, then click on Continue and go to next step.





You can see that the all partitions of your hard drive are shown here. The Type NTFS  shows the current windows partitions. Go ahead and click on free space, then click the + button.  Now you will come up with the installer's partition editor. Here you have to be careful and follow these steps accurately.


As I mentioned earlier we will have to make three partitions for Ubuntu. For all three partitions, use Ext4 journaling file system which is stick with the default.




  1. For the root partition allocate any value higher than 10GB. Select ' / ' for the Mount point. Then click OK. 



Again there will be free space display on the field. Repeat the previous case and follow number 2. 
                      

     2.  The next partition will be mounted as /home. The home partition will bear all new files, folders, software etc. So assign a big amount of your free space. Then click OK. 


  


     3. The last partition will be the swap. For the mount point, select swap area. The size for swap would be greater than 2GB is enough. 






That it's it. Go ahead and click Install Now button to continue with the rest of the installation. The next step will be selecting the region. Select region and click Continue. 


The final step is giving the username, Computer's name and the password. Then click Continue to install Ubuntu to your machine.





After installation has completed successfully, reboot your computer. After rebooting the computer will direct to the GRUB menu. You can select Ubuntu or Windows Boot Manager. So enjoy Ubuntu.










Tuesday, May 16, 2017

Git for Beginners - Part 02 - Installation


In this tutorial I will show you how to install Git on your machine. There are different installation processes for different platforms.
  • Mac Users:
You don't need to worry about that installing Git. It comes to your system by default.
  • Windows Users:
You can download Git for Windows using this link. Then download the latest version to your machine.


If you browse git-scm.com site, you may see that it will automatically select your operating system and the latest version of the Git. Go ahead and click Download for Windows. 

Below steps are shown how to install git on your machine. Go ahead and follow these steps.



  • Then you can change the directory of the installation of the Git or set it to default and click Next.

  • You can select components to install to your machine. Make sure that Git Bash and Git GUI is ticked. In this tutorial series, I will use the Git Bash. But feel free to check the Git GUI whenever you like. Then click Next.
  • You may create a shortcut for the program for a particular place. If everything is fine to click Next.
  • Then you can Adjust the PATH Environment. Here you can use Git from Git Bash only or  Git from the Windows Command Prompt. For this tutorial, I will choose the second option.



  • For the next three options keep it default and click next. 


After the installation process go to Start Menu. You can see that there are two options, Git Bash and Git GUI. As I mentioned earlier I will use Git Bash. It is a command line interface similar to Unix Bash. But you may use the Git GUI if you like. 

  • Linux Users:
If you are a Linux user open a terminal and type $ sudo apt-get update. Then, 

If you using a Debian-based distribution like Ubuntu, type $ sudo apt-get install git.


If you are using Fedora, type $ sudo yum install git. 

From these commands, the latest version of the Git will be installed on your machine. This is all about the installation of the Git. In the next tutorial, I will show you how to configure Git, implement a Git repository and how to work with it.







Thursday, May 11, 2017

How to Format a PC and install windows 10




If you want to install Windows to your PC, you have to follow several steps. 

STEP 1:  Make your pen drive to a bootable device. 
      
           In this step, you can use a CD, which is already booted with Windows 10. Otherwise, you have to make your pen drive to a bootable device. For this, you may use a software such as Rufus, WinToBootic, RMPrepUSB etc. Here I use Rufus 2.6 version.
      

First, it asks user to select the device which you want to boot. You can select the pen drive for this.

Then it asks the partition scheme and system type. Here you have to be careful. Because if you select wrong partition scheme, you will not be able to install the OS.

According to the requirement of the user, there are two types.

    1. You want to fully format your PC.
    2. You want to format only the C drive.

              1. If you want to fully format your PC I recommended you to select the 'GPT partition scheme for UEFI'. Because it is much faster than the MBR partition scheme. But if your PC is compatible with MBR partition scheme, it may use that option. 

(You can change your partition scheme from  MBR to GPT or from GPT to MBR using 'DISKPART' option in an administrator command prompt. But it must be done in real time in real place. Otherwise, it will erase your all files.) 

              2. If you want to format only the C drive, first you have to check what partition scheme your hard disk is. For this, you can use AOMEI Partition Assistant software. 

OK.. then it asks the cluster size. The default size is not a problem. Therefore you do not need to change it. 

You can give any name for the device you want. It is up to you.

STEP 2:

Finally, you have to browse the location of the ISO image. After selecting that you can start it.  After finishing the boot process, insert the installation media into appropriate location and reboot the machine. When the PC start from the beginning you have to press some function key (It may vary according to the PC brands. Commonly it may be ESC,f2,f9,f12) 

Then a new window will come up with three or four options. One is your previous OS boot option. And there are two options will come up with your company name of your pen drive. One of this option must be compatible with UEFI. Select this and press Enter. 

STEP 3:
   

After that, your PC will pop up with Windows setup. If you are OK with language, time and the keyboard type, press Next. 




Then you can see two options in this window.
           
                     1. Install now
                     2. Repair your computer.

As I said before if you want to fully format your PC and convert the file system to specific scheme, this is the time to do it. If you want only format the C drive, DO NOT follow STEP 4. Because this will fully clean up your hard disk.

STEP 4:

                      1. Press Repair your computer.
                      2. Select Troubleshoot option from the pop-up window.


                    3. Then select 'Advanced Option'



                  4. Then select 'Command Prompt'. 



               5. You can see that this is administrator command prompt. Then type 'DISKPART' and press Enter.

               6. Then type 'list disk'. Then it will show two disks. Disk 0 is your hard drive. Disk 1 is your pen drive.



                7. Type 'select disk 0' to select the hard drive. 

                8. Type 'clean'. It will erase your data on your hard disk and that data cannot be recovered.

                9. If you want to convert your file system to MBR, type 'convert mbr'. Otherwise, type 'convert gpt'

              10. Then type 'exit' twice and restart your PC again. 

STEP 5:

      Yes, That is it. Now you can press 'install now'. Then below window will pop up. If you have the product key, you can type it in the dialog box and press 'Next'.

If you don't have a product key, press 'I don't have a product key'. 





STEP 6:
     
    Then another window will pop up and asks the type of installation. You can use Custom installation option. 



STEP 7:

      Now, this is the time to select your partition to install windows. If you format only the C drive,  follow these steps.
     
         1. Click on the C drive icon.
         2. Click 'Format'.
         3. Then click 'New' and press 'Apply' button. If you want to change the partition size, you can change it now.
         4. Press 'Next' to install windows.
     

If you want to fully format the hard drive, follow these steps.

       1. Click on the Drive and format it. 
       2. The click 'New' and make a new partition according to your requirement. 
       3. Then press one of the partition and press 'Next'.



This will take some time to install windows. Now you are almost done. Then the PC will restart and boot Windows 10.



STEP 8:
     
   Now you have to install drivers for your PC. So right click on windows button and select 'Device Manager'. You can select any drive and update it very easily. 







You may use the official website of the particular category of the PC too. 


Copyright © iTecTricks | Powered By Blogger

Design by Shehan Vanderputt