Repo erstellen

git init


git clone /pfad/zum/repository
git clone benutzername@host:/pfad/zum/repository 

add and commit

git add <dateiname>
git add *
git add .
git add -A

git add -i 

git rm <filename>

git commit -m "Commit-Nachricht"

#add and commit
git commit -a -m "Commit-Nachricht"


git push origin master

git remote add origin <server>
git remote add origin http..../test.git

#push to branch
git push origin <branch> 

#remove remote repo
git remote remove origin


#branch erstellen
git checkout -b feature_x

#del branch 
git branch -d feature_x

#change back to master
git checkout master

#push to remote
git push origin <branch> 

git merge <branch>

#switch branch
git switch branch


#get updates from repo (fetch and merge)
git pull


git diff <quell_branch> <ziel_branch>

git tag 1.0.0 1b2e1d63ff

git log

git status

#show commit
git show <id>


#reset to last HEAD entrie
git checkout -- <filename>

#reset and set to remote state
git fetch origin
git reset --hard origin/master 

config and tweaks


git config color.ui true

#log oneline
git config format.pretty oneline

git config --global "myname"
git config --global

#store pwd
git config --global credential.helper store

to integrate

Command line instructions

You can also upload existing files from your computer using the instructions below.

Git global setup
git config --global "Mr user"
git config --global ""
Create a new repository
git clone
cd mygitr
git switch -c main
git add
git commit -m "add README"
git push -u origin main
Push an existing folder
cd existing_folder
git init --initial-branch=main
git remote add origin
git add .
git commit -m "Initial commit"
git push -u origin main
Push an existing Git repository
cd existing_repo
git remote rename origin old-origin
git remote add origin
git push -u origin --all
git push -u origin --tags