Top10 Git commands you should know

Posted by

In this article, we will discuss the various Git commands that should be known as developers, data scientists, or product managers. Git will also be used to view, delete and organize. In addition, we’ll show you how to configure escape Vim and save time using Bash aliases and Git editors.
If you are not familiar with the basic git commands, please check out my previous articles on git workflow before reading this article.
Below are 10 commands to understand and some of their common symbols. Each command is linked to the Atlassian Bitbucket guide for that command.

Check information

Git diff -- View all local file changes. File names can be appended to show changes to only one file.
Git log -- View all submission history. It can also be used for files with git log-p my_file. Enter Q to exit.
Git blame my_file -- See who changed the content and time in my_file.
Git reflog -- Displays the change log for the local repository HEAD. Help to find missing documents.

Viewing information with Git is not very confusing. Git, by contrast, offers a wide range of options to delete, undo submissions, and file changes.

Roll back

Git reset, git checkout and git revert are used to undo the impact of changes made to the repository. These commands may be difficult to understand.
Git reset and git checkout can be used to submit and single file. Git revert is only used for submission level.
If you are only handling local submissions that have not yet been merged into collaborative remote work, you can use any of these commands.
If you are collaborating and need to undo submissions in remote branches, use git revert.

Arranging information

Git commit -- amend -- adds phased changes to recent commits.
Git push my_remote -- tags -- sends all local tags to remote repo. Suitable for version control changes.