Important Git Commands
The Git version control system can be optimized best with the appropriate Git commands. We’ll show you the most important commands. Git commands are executed from the terminal.
- Simple registration
- Premium TLDs at great prices
- 24/7 personal consultant included
- Free privacy protection for eligible domains
How do I configure a name and email with Git commands?
A username and valid email address are required to work on a project. Use the following Git commands to configure these.
Configure your username:
Check your username:
Enter your email address:
This is how you access your email:
This command will show all your entries in the overview:
How do I check the overview and changes?
There are several important Git commands that make it easier for you to work on and in your repository. This command will give an overview of the repository:
This gives you an overview of the local status and the changes that have not been adjusted yet:
The changes are highlighted in red.
Use Git Diff to check for differences between the pending commit and the last current version:
What are the Git Commands for repositories?
The following Git commands allow you to save changes to the local repository yourself.
Use this command to add all new, changed or deleted files:
However, if you only want to apply certain changes to your commit, put them in square brackets after the command:
Finalize a Git commit using this command:
Use this command to send explanations about the current step:
Show the current commits in your local repository with Git Log:
What are the Git commands for branches
The following Git commands are required to work with a branch.
List all branches:
Information about the different branches:
List of all branches in the local repository:
Create a new branch:
Switch to a specific branch with Git Checkout:
Create a new branch and switch to it:
Move the new branch from the local repository to the commit repository:
Delete a branch in the local repository as long as it contains accepted changes only:
Add changes from a branch to the current branch:
Retrieve changes from a remote repository with Git Pull:
What are the Git commands for tags?
These Git Commands will make your job easier if you use tags.
List all tags:
Retrieve all tags from the commit repository for your local repository:
Display a specific day:
Push a specific tag to the commit repository with Git Push:
Push all tags to the commit repository:
Delete tag in a local repository:
Using Git optimally
These Git commands will enable you to work quickly and effectively in the version control system. You’ll also find a Git tutorial for getting started as well as a Git cheat sheet with a PDF download in our Digital Guide. If you are looking for an alternative to Linus Torvalds system, our comparison of Git vs. SVN might be of interest to you.
Bring your project online in just three steps with Deploy Now from IONOS. Static websites and single page apps can be made available to your customers even faster than before.