Git: Unterschied zwischen den Versionen

Aus xinux.net
Zur Navigation springen Zur Suche springen
Zeile 17: Zeile 17:
 
*git init
 
*git init
 
*git status -s
 
*git status -s
 +
==create a new file==
 +
*echo -e '#!/bin/bash\necho hallo welt' > silly-prog.sh
 +
*chmod +x silly-prog.sh
  
 
=links=
 
=links=

Version vom 20. Dezember 2017, 15:18 Uhr

git server

create user and group

  • groupadd dev
  • useradd -G dev -d /home/gituser -m -s /bin/bash gituser
  • passwd gituser

mkdir and init empty git

  • mkdir project.git
  • cd project.git/
  • git --bare init

git client

copy id_rsa.pub to the git server

  • ssh-copy-id gituser@git-server:

create own project directory

  • mkdir my-project
  • cd my-project/

git init and show status

  • git init
  • git status -s

create a new file

  • echo -e '#!/bin/bash\necho hallo welt' > silly-prog.sh
  • chmod +x silly-prog.sh

links