Git is a significant piece of day by day programming and is normally utilized in the product business. Since you can utilize many commands, dominating Git needs time. Yet, a few commands are all the more generally utilized. So I will share the most helpful Git commands in this post that each engineer should know.
What is Version Control System
The version control system is frameworks that permit us to add to and oversee various deliveries and phases of a product item without really keeping different documents or folders. They additionally make improvement inside a group more sensible and to a lesser degree a torment as designers don't need to exchange folders, but instead, speak with a solitary source where every one of the progressions is going on and everything is saved.
What is Git?
Git is the most usually utilized VCS. Git tracks the progressions you make to documents, so you have a record of what has been done, and you can return to explicit adaptations should you at any point need to. Git likewise makes cooperation simpler, permitting changes by numerous individuals to all be converted into one source.
Now let's talk about some of the useful Git commands you should know.
git add .: adds all the files
git commit: records the file permanently
git config: it controls set for the local save project/file
git help: displays all the necessary information about git commands
git status: gives all the information about the current branch
git log: get to know about the previous commits
git diff: runs a diff work on Git information sources. These information sources can be submits, branches, records and then some
git reset --hard: deletes all your uncommited changes | dangerous command lol
git remote add <url or address>: to add a new remote address
git remove rm: to remove file form Git repository
git push -u origin master: for pushing local files to github
git branch: the tip of a progression of submits—it is anything but a holder for submits.
git checkout: allows you to explore between the branches made by git branch
git tag: tags are utilized to check a submit stage as important
git fetch: this command advises your local git to recover the most recent meta-information data from the first
git rebase: you can take every one of the progressions that were submitted on one branch and replay them on an alternate branch.
git config -global color.ui true: see different color on different outputs
git init:creates a new git repository
git commit -m "New file Readme.md": saves your changes in the local repository
git show: that is utilized to see extended subtleties on Git items like masses, trees, labels, and submits.
git merge: allows you to take the autonomous lines of improvement made by git branch and coordinate them into a solitary branch
git pull <repo link>: to download the folder from the remote repository
git stash save: stores modified tracked files
git stash drop: discards most recent stashed files
mkdir project1: create new folder project1
So these are the most supportive git commands I find in my regular programming. There are a few additional things to find out about Git, I will clarify them in a different post.