Skip to main content


GitHub Guide





Git development began in April 2005

Git is a distributed version-control system 

It is designed for coordinating work among programmers

It is primarily used for source code management in software development

One of the biggest advantages of Git is its branching capabilities

This facilitates the feature branch workflow popular with many Git users






Advantages in Git

  • Data redundancy and replication
  • High availability
  • Only one.git directory per repository
  • Superior disk utilization and network performance
  • Collaboration friendly
  • Any sort of projects can use GIT




Disadvantages in Git
  • Git is less preferred for handling extremely large files or frequently changing binary files .
  • GIT does not support ‘commits’ across multiple branches or tags.





Git Commands 


1) git config

Utility : To set your user name and email in the main configuration file.
How to : To check your name and email type in git config --global user.name and git config --global user.email. And to set your new email or name git config --global user.name = “Dhruv Nenwani” and git config --global user.email = “nendhruv@gmail.com


2) git init

Utility : To initialise a git repository for a new or existing project.
How to : git init in the root of your project directory.


3) git clone

Utility : To copy a git repository from remote source, also sets the remote to original source so that you can pull again.
How to : git clone <:clone git url:>


4) git status

Utility : To check the status of files you’ve changed in your working directory, i.e, what all has changed since your last commit.
How to : git status in your working directory. lists out all the files that have been changed.


5) git add

Utility : adds changes to stage/index in your working directory.
How to : git add .


6) git commit

Utility : commits your changes and sets it to new commit object for your remote.
How to : git commit -m”sweet little commit message”


7) git push/git pull

Utility : Push or Pull your changes to remote. If you have added and committed your changes and you want to push them. Or if your remote has updated and you want those latest changes.
How to : git pull <:remote:> <:branch:> and git push <:remote:> <:branch:>


8) git branch

Utility : Lists out all the branches.
How to : git branch or git branch -a to list all the remote branches as well.


9) git checkout

Utility : Switch to different branches
How to : git checkout <:branch:> or **_git checkout -b <:branch:> if you want to create and switch to a new branch.


10) git stash

Utility : Save changes that you don’t want to commit immediately.
How to : git stash in your working directory. git stash apply if you want to bring your saved changes back.


11) git merge

Utility : Merge two branches you were working on.
How to : Switch to branch you want to merge everything in. git merge <:branch_you_want_to_merge:>


12) git reset

Utility : You know when you commit changes that are not complete, this sets your index to the latest commit that you want to work on with.
How to : git reset <:mode:> <:COMMIT:>


13) git remote

Utility : To check what remote/source you have or add a new remote.
How to : git remote to check and list. And git remote add <:remote_url:>


Comments

Post a Comment

Popular posts from this blog

GitHub link  https://github.com/chamoddissanayake/OnlineFashionStore Group Project - Online Fashion Store There is a use case diagram of the system . This diagram denotes a better understanding about the system online fashion store. It provides who are the users of the system and what are the functionalities of the each user. System Functionalities Main Roles in the system. User Admin Store Manager Guest Only users who logged in to the system can place orders   Once the admin creates a login for the store manager, it should be notified to the store manager via email Admin can create categories for the products The store manager can add products with details to the relevant category and add discounts to selected products User can add products to the shopping cart   Users can purchase the selected products in the shopping cart by selecting the payment method Users can create a wish list from their preferred
Restful Web Service Restful Web Service  is a lightweight, maintainable, and scalable service that is built on the REST architecture. Restful Web Service, expose API from your application in a secure, uniform, stateless manner to the calling client. Restful mostly came into popularity due to the following reasons: Heterogeneous languages and environments – This is one of the fundamental reasons which is the same as we have seen for  SOAP  as well. It enables web applications that are built on various programming languages to communicate with each other With the help of Restful services, these web applications can reside on different environments, some could be on Windows, and others could be on Linux. Restful Architecture An application or architecture considered REST full or REST-style has the following characteristics State and functionality are divided into distributed resources – This means that every resource should be accessible via the normal HTT
React                -Is a java script library for build user interfaces.               -Used to create single page applications.               -Allows us to create reusable UI components.               -Every component in react goes through a life cycle of  events.               -Developed and maintained by Facebook and  Instagram.               -Acts as view in MVC architecture.               -Classes are considered as components.               -Simplicity and aim to performance are main benefits.                                              Main features in React (01)One way data flow Data flows parent component to child component only. But action flows from child component to parent component only. (02)Virtual DOM React maintain a virtual DOM. Continuously monitoring users actions. Only the changed element re enter. (03)JSX JavaScript XML. HTML like syntax. Prevents cross site attacks. -----------------------------------------