An Interest In:
Web News this Week
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
June 16, 2021 06:50 pm GMT
Original Link: https://dev.to/andrereus/git-basics-cheatsheet-50hh
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
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)
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:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To