Skip to main content

learn Github in 3 Steps



Github - Repository, which save the files into the cloud

Git - Using users can actually retreive or save the data into the cloud


Download :
git-scm.com

check on command or terminal:
git --version

Configure:
git config --global user.name "ur name"
git config --global user.email "ur email"

Create folder:

mkdir folder_name  and go inside it - where u create the project or files

  • Add any file  do the follwoing setps
  • git init .                   // this is initialze the git
  • git status                 // to check status
  • git add index.html  //e.g index.html u created and want to upload into the git hub
  • git commit -m "uploaded first file"
  • git log   // to check ur log   - type q to quit from log
  • // do same changes to the file and upload
  • git status
  • git diff index.html // can see the changes
  • git add index.html 
  • git status
  • git commit -m "uploaded the upgraded file"

Branching:

master - Default branch

create develop branch:

  •     git branch develop - to create branch e.g develop
  •     git branch - check branches
  •     git checkout develop - to switch from one barnch to another
  •     do some changes in develop branch file
  •     check master and develop branch


// create a branch if it does not exist, create new branch

  • git checkout -b skill/new-skill
    • IMPORTANT : so if u create this skill/new-skills branch inside the develop branch, then all the data of develop branch will be replicated into the skill/new-skills branch
  • Now, once u added the new skills - just update it 
    • git commit -am ""done with new skills"

Merging: 

As we above, suppose we have develop and skills branches. So to merge the child branch into the parent branch or vice versa.
  • go to the branch in which u wanna merge by,
    • git check out develop //here skills branch data will be transfered into the develop branch
  • git merge feature/new-feature
  • git log - to check the updated file in develop branch

GIT FLOW: Pluggin

It creates hierarchy of the project.
  • install git-flow
    • brew install git-flow // for mac
    • sudo apt-get install git-flow
  • git flow init -d - select branch for default, "master" 










Comments

Popular posts from this blog

Cloud Computing

Cloud Computing Types: AWS (Amazon Web Services) - 90% Market - Amazon Company Azure - 5% Market - Microsoft Google Cloud - Google  Many... AWS: Cloud computing platform is given by Amazon. login url: https://aws.amazon.com/ My Account -> AWS Management Console There are around 50 AWS services. AWS EC2 service is used to create computer instances. How to access your project which is deployed in tomcat in AWS EC2.  http://13.232.31.129:8080/projectname/index.jsp http://ec2-13-232-31-129.ap-south-1.compute.amazonaws.com:8080/projectname/index.jsp Amazon Route53 : Through you can buy your own domain name and integrate with given public IP. (Example 13.232.31.129 to www.aamer.com) http://www.aamer.com:8080/projectname/index.jsp 

Version Control System

Why Version Control Systems: Centralized repository to share the code. Multiple people work in a single code (Project Code) Development fast since many developers work on the single code. Different Version Control Systems Internet-Based (WAN Based) GitHub BitBucket Microsoft VSTS many more... LAN Based  SVN CVS many more... Client for above all version controlling systems: Git (Git Bash shell) SourceTree Repository types: Public  Private // To push the project from local PC – FIRST PROJECT 1.        First create the repository on remote location 2.        Install and Open git bash 3.        Go to your project directory, where your files are placed. 4.        Perform git commands a.        Git init – it will generate .git folder (To see it, make the folder show f...