• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
seegatesite header

Seegatesite.com

Seegatesite.com - Programming Tutorial , Sharing , How and Learn Together

  • TOOLS
    • Bootstrap Navbar Online Generator
    • Customize Sidebar Menu Bootstrap 3
    • Bootstrap Demo
  • ADVERTISE
  • CATEGORIES
    • Android
    • Blogging Tips
    • Database
    • CSS
    • Info Gadget
    • Javascript
    • Linux
    • PHP
    • Various
    • WordPress
  • Q&A
  • PHP
  • JAVASCRIPT
  • JQUERY
  • ANGULAR
  • WORDPRESS
  • SEO
  • REACT
🏠 » Various » Tutorial Git Basic Commands That Beginners Must Know

Tutorial Git Basic Commands That Beginners Must Know

By Sigit Prasetya Nugroho ∙ December 22, 2017 ∙ Various ∙ Leave a Comment

Share : TwitterFacebookTelegramWhatsapp

What is Git? Git is a version control system and used by developers to develop software together. The primary function of Git is to set the version of the source code of your program by putting a line mark and which code is added or replaced.

In recent years, Git has grown rapidly into one of the most widely used version control systems by reliable developers. In this article, I will share some basic GIT commands that must be known by beginners.

Here are the basic GIT commands that must be known by beginners.

Tutorial Git Basic Commands That Beginners Must Know Min

Git revert –no-commit [commit]

Git revert generates a new commit that cancels the changes made by the current commit and generates a new commit with the generated content. If we want to return the previously mentioned commit and avoid the automatic commit, we can use – no-commit atau steno -n.

Git log –no-merges

This git command is used to display the entire commit history that we do, but skip commit that combines two branches.

Git diff -w

Git diff shows changes between two commit, two working trees and two files on disk. When many people work on the same project, there are often changes. Whether it’s the tab text editor or the space settings. To ignore the difference, we can use -w.

Git diff –stat

Displays how each file has changed over time. We can also add three parameters to it, such as:
– width: to override the default output width
– name-width: to set the filename width
– count: limit the output to the first number of rows.

Git stash branch

This command creates a new branch named branch-name, then applies the changes. If no savings provided, use the most recent ones. This allows us to apply the switch to a safer place.

Git reset –soft HEAD^

Reset head to a specific commit without touching index files and trees that are working. All changes made after the commit are moved to the “staged for commit” stage. After that, we just run git commit to adding it back.

Git commit –amend

With git commit –amend, we can change the previous commit, instead of creating a new one. If we have not pushed changes to the remote branch yet, we can use this command to change the latest commit, add recent changes and even change our commit message.

Git branch -a

This command lists all branches outside and local branches. Outside branches are our projects that are broadcasted on the Internet or the network. We can also use –merged to see which branches are fully merged into the parent branch. In this way, we can track our branches and find out which ones are not used anymore and can be removed.

Git add -p

When we use this command, instead of adding all the changes to the index, it passes through each change and asks what we want to do with it. In this way, it allows us to interactively choose what we want to do.

Git pull –rebase

Git pull –rebase forces git to first pull changes and then rebase commits that are not purged onto the latest version of the remote branch. The –rebase option can be used to ensure a linear history by preventing unnecessary merging.

Thus my article about Tutorial Git Basic Commands That Beginners Must Know.

Another Various Related Post :

  • Tutorial Create Simple POS Using ReactJS And Laravel Lumen Part 2
  • 5 Best ReactJS Books Journey To Hero (Must Have)
  • 6 Best Google Chrome Extensions To Increase Developers Productivity In 2020
  • 5 Best Online Programming Learning Courses Sites
  • Work From Home Application That Helps Amid the Coronavirus pandemic
  • 8 Top-quality Ebookshare Websites To Download Free E-books And Safe From Malware

Avatar for Sigit Prasetya Nugroho

About Sigit Prasetya Nugroho

This site is a personal Blog of Sigit Prasetya Nugroho, a Desktop developer and freelance web developer working in PHP, MySQL, WordPress.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Welcome to my Home,

Avatar for Sigit Prasetya NugrohoThis site is a personal Blog of Sigit Prasetya Nugroho, a Desktop developer and freelance web developer working in PHP, MySQL, WordPress.



Popular Articles

Checked checkbox AdminLTE Bootstrap in Jquery

November 4, 2014 By Sigit Prasetya Nugroho 7 Comments

Simple create date format validation with jqueryUI

December 21, 2014 By Sigit Prasetya Nugroho Leave a Comment

Create Simple Progress Bar for Fake Online Generator with Jquery

January 10, 2015 By Sigit Prasetya Nugroho Leave a Comment

22+ Coolest Free Jquery Plugin For Premium Theme

October 3, 2015 By Sigit Prasetya Nugroho Leave a Comment

Easy Build Your Anti Copy Paste Plugin

October 6, 2015 By Sigit Prasetya Nugroho Leave a Comment

Popular Tags

adminlte (15) adsense (13) adsense tips (4) affiliate amazon (13) amazon (12) Android (8) angular (16) angular 4 (12) angular 5 (4) asin grabber (3) Bootstrap (27) codeigniter (5) create wordpress theme (5) crud (8) css (6) free wordpress theme (7) google adsense (4) imacros (4) increase traffic (6) jquery (34) laravel (10) laravel 5 (5) learn android (5) lumen api (4) modal dialog (5) mysql (6) nodeJs (4) optimize seo (4) pdo (6) php (30) plugin (53) pos (8) Publisher Tips (5) react (6) Reactjs (9) SEO (37) theme (17) tutorial angular (5) tutorial angular 4 (6) tutorial javascript (10) tutorial javascript beginners (4) twitter (3) wordpress (18) wordpress plugin (13) XMLRPC (5)




  • About
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms and Conditions

©2022 Seegatesite.com