Gitlab client: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „=Command line instructions= You can also upload existing files from your computer using the instructions below. =Git global setup= git config --global user.nam…“)
 
 
(13 dazwischenliegende Versionen von einem anderen Benutzer werden nicht angezeigt)
Zeile 1: Zeile 1:
−
=Command line instructions=
+
=Erste Anmeldung=
−
You can also upload existing files from your computer using the instructions below.
+
==Git global setup==
−
=Git global setup=
+
*git config --global user.name "Thomas Will"
−
git config --global user.name "Max Mustermann"
+
*git config --global user.email "thomas.will@xinux.de"
−
git config --global user.email "max.mustermann@xinux.de"
+
*git config --global init.defaultBranch main
 +
=Create a new repository=
  
−
=Create a new repository=
+
'''Wichtig''': Beim erstellen des Repos auf dem Server, keine README erzeugen lassen.
−
git clone https://git.flipper.de/max.mustermann/openvpn.git
 
−
cd openvpn
 
−
touch README.md
 
−
git add README.md
 
−
git commit -m "add README"
 
−
git push -u origin master
 
  
 +
*git clone git@git.xxx.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=
 
=Push an existing folder=
−
cd existing_folder
+
*cd existing_folder
−
git init
+
*git init --initial-branch=main
−
git remote add origin https://git.flipper.de/max.mustermann/openvpn.git
+
*git remote add origin git@git.xxx.de:thomas.will/pfsense-scripts.git
−
git add .
+
*git add .
−
git commit -m "Initial commit"
+
*git commit -m "Initial commit"
−
git push -u origin master
+
*git push -u origin main
−
 
 
 
=Push an existing Git repository=
 
=Push an existing Git repository=
−
cd existing_repo
+
*cd existing_repo
−
git remote rename origin old-origin
+
*git remote rename origin old-origin
−
git remote add origin https://git.flipper.de/max.mustermann/openvpn.git
+
*git remote add origin git@git.xxx.de:thomas.will/pfsense-scripts.git
−
git push -u origin --all
+
*git push -u origin --all
−
git push -u origin --tags
+
*git push -u origin --tags
−
~
 

Aktuelle Version vom 11. November 2022, 11:06 Uhr

Erste Anmeldung

Git global setup

  • git config --global user.name "Thomas Will"
  • git config --global user.email "thomas.will@xinux.de"
  • git config --global init.defaultBranch main

Create a new repository

Wichtig: Beim erstellen des Repos auf dem Server, keine README erzeugen lassen.

  • git clone git@git.xxx.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.xxx.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.xxx.de:thomas.will/pfsense-scripts.git
  • git push -u origin --all
  • git push -u origin --tags