RU | EN | DE
| Commands | Description |
|---|
| git init | initialization |
| git add *git add text.txtgit rm text.txtgit mv oldname.txt newname.txt | add filesadd a filedelete a filerename a file |
| git commit -m “first commit” | commit with a message |
| git remote add origin https://github.com/path/name.gitgit remote set-url origin git@github.com-vibond:VIBondarenko/clavionx.git | add a remote repositorychange the remote repository |
| git push -u origin master | push changes to the remote repository |
| |
| git status | current repository status (changes, unresolved conflicts, etc.) |
| git log —oneline | view all commits |
| git checkout . | restore everything |
| git checkout “commit code” | revert to the state of this commit |
| git checkout master | switch back to the master branch |
| |
| git fetch —allgit reset —hard origin/master orgit reset —hard origin/<branch_name> | restore files on the local computer |
| |
| git push origin | merge all local repository branches into the remote repository |
| git push origin master | same as above, but pushes only the master branch |
| git push origin HEAD | push the current branch without typing its full name |
| git pull origin | merge all branches from the remote repository |