This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:git [2026/03/17 13:19] – [Remote git] tmade | linux:git [2026/07/16 13:09] (current) – [Commands] tmade | ||
|---|---|---|---|
| Line 15: | Line 15: | ||
| git config user.name "Your Name" | git config user.name "Your Name" | ||
| git status | git status | ||
| + | git add . #or "git add kubeadm-config.yaml" | ||
| + | git commit -m " | ||
| + | git commit -am "my message" | ||
| + | git push gitlab master | ||
| + | git pull origin master | ||
| git tag --list | git tag --list | ||
| git tag #show tags | git tag #show tags | ||
| Line 20: | Line 25: | ||
| git add file #Add file " | git add file #Add file " | ||
| git rm --cached myfile | git rm --cached myfile | ||
| - | git add . #Add all files in working directory | ||
| - | git commit -m " | ||
| git log #Show history | git log #Show history | ||
| git revert ID #Revert to change from ID - other changes after not affected | git revert ID #Revert to change from ID - other changes after not affected | ||
| Line 29: | Line 32: | ||
| git reset --hard HEAD~2 | git reset --hard HEAD~2 | ||
| git checkout -b branch-name | git checkout -b branch-name | ||
| + | git push origin --delete < | ||
| + | git branch -d < | ||
| tag = read only branch nie wieder veränderbar/ | tag = read only branch nie wieder veränderbar/ | ||
| git tag --list | git tag --list | ||
| git branch --list | git branch --list | ||
| git branch --all #show all branches and remote | git branch --all #show all branches and remote | ||
| + | git branch -D branch | ||
| git fetch --prune | git fetch --prune | ||
| git fetch #update remote branches | git fetch #update remote branches | ||
| Line 47: | Line 53: | ||
| | | ||
| + | Rebase: | ||
| + | |||
| + | git commit | ||
| + | git rebase -i HEAD~4 | ||
| + | git rebase -i ffa3fb36cf62ea41824b781b681c7e753d2406ee~ (commit ID) #back inclusive last commit through " | ||
| + | git rebase -i ffa3fb36cf62ea41824b781b681c7e753d2406ee (commit ID) #back exclusive last commit | ||
| + | git push -f | ||
| ====scripts==== | ====scripts==== | ||
| Line 103: | Line 116: | ||
| git remote remove origin | git remote remove origin | ||
| git remote rename origin old-origin | git remote rename origin old-origin | ||
| - | git add . #or "git add kubeadm-config.yaml" | ||
| - | git commit -m " | ||
| - | git push gitlab master | ||
| - | git pull origin master | ||
| git push --set-upstream origin --all | git push --set-upstream origin --all | ||