Sets the configuration values. The email address or the username can be defined. With --global you define this configuration value global for the system.
git config --global user.name "John Smith" git coniig user.email "email@example.com"
Initializes a directory as a git directory. Creates a hidden folder (.git).
Using this command, you clone a git repository from a server to your local computer.
git clone https://github.com/torvalds/linux.git
Add files to the git directory (files to be committed later). With the 'git add .'- command all files that are currently in the directory will be added to the version control.
git add .
Just like the add command, only files are deleted from the repository in this case - the files will not be deleted from your system.
git rm file.txt
Takes all changes, adds new files or deletions and saves it to an object.
git commit -m "commit message"
Checks the state of the files in the git directory.
List all branches.
Checkout to a branch.
git checkout master
Resets the directory to the state of the last commit.
If you reset your local changes to the state of the master branch on the server, the command would be 'git fetch master'.
git fetch master
Combination of fetch and merge. Takes the changes of the server and guides them with their own changes together.
Uploads all local commits to the repository server.