Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
June 16, 2021 06:50 pm GMT

GIT Basics / Cheatsheet

What is GIT?

Best short and also official description:

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Benefits / Comparison:

Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.

Setup

Download and install it fromhttps://git-scm.com/

GIT Commands

Basic Commands

git status // Show the current statusgit init // Initialize project folder with GITgit add // Add changes to the stagegit commit // Commit changes in the stage to the history / loggit log // Show the commit history

GIT Help

git help // Help Overviewgit help -a // GIT Commandsgit help -g // GIT Guides

GIT Branching in visual form

GIT Branching

Branching Commands

git branch // Create a branchgit checkout (in future "git switch") // Switch to a branchgit merge // Merge a branch into an other one

Playground for GIT Commands:https://git-school.github.io/visualizing-git/

GIT Client

Some good free GIT Clients (GUIs) are:

Optional useful Diff Tool: Beyond Compare

Collaboration

Collaboration (or cloud backup)

GIT Collaboration

Hosting services

Collaboration Commands

git clone // Download a repository to your PCgit fetch // Download the latest content from the servergit pull // Download the latest content from the server and merge it with your local contentgit push // Upload your content to the server

Useful Links


Original Link: https://dev.to/andrereus/git-basics-cheatsheet-50hh

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To