Gitlab client: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 1: | Zeile 1: | ||
| + | =Git global setup= | ||
| + | *git config --global user.name "Thomas Will" | ||
| + | *git config --global user.email "thomas.will@xinux.de" | ||
| + | =Create a new repository= | ||
| + | *git clone git@git.willux.de:thomas.will/pfsense-scripts.git | ||
| + | *cd pfsense-scripts | ||
| + | *git switch -c main | ||
| + | *touch README.md | ||
| + | *git add README.md | ||
| + | *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@git.willux.de:thomas.will/pfsense-scripts.git | ||
| + | *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@git.willux.de:thomas.will/pfsense-scripts.git | ||
| + | *git push -u origin --all | ||
| + | *git push -u origin --tags | ||
| + | |||
| + | |||
| + | |||
| + | |||
=Erste Anmeldung= | =Erste Anmeldung= | ||
;Name festlegen | ;Name festlegen | ||
| Zeile 6: | Zeile 34: | ||
;Default branch lokal setzen. | ;Default branch lokal setzen. | ||
*git config --global init.defaultBranch main | *git config --global init.defaultBranch main | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Version vom 10. November 2022, 12:11 Uhr
Git global setup
- git config --global user.name "Thomas Will"
- git config --global user.email "thomas.will@xinux.de"
Create a new repository
- git clone git@git.willux.de:thomas.will/pfsense-scripts.git
- cd pfsense-scripts
- git switch -c main
- touch README.md
- git add README.md
- 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@git.willux.de:thomas.will/pfsense-scripts.git
- 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@git.willux.de:thomas.will/pfsense-scripts.git
- git push -u origin --all
- git push -u origin --tags
Erste Anmeldung
- Name festlegen
- git config --global user.name "Thomas Will"
- Mail Adresse setzen
- git config --global user.email thomas.will@xinux.de
- Default branch lokal setzen.
- git config --global init.defaultBranch main