Git: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Thomas (Diskussion | Beiträge) |
Thomas (Diskussion | Beiträge) |
||
Zeile 5: | Zeile 5: | ||
*passwd gituser | *passwd gituser | ||
==mkdir and init empty git== | ==mkdir and init empty git== | ||
+ | *su - gituser | ||
*mkdir project.git | *mkdir project.git | ||
*cd project.git/ | *cd project.git/ | ||
*git --bare init | *git --bare init | ||
+ | |||
=git client= | =git client= | ||
==copy id_rsa.pub to the git server== | ==copy id_rsa.pub to the git server== |
Version vom 20. Dezember 2017, 15:23 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
- su - gituser
- 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
show status again
- git status -s
?? silly-prog.sh
add the whole folder
- git add .
- git status -s
A silly-prog.sh
commit and show log
- git commit -m 'Initial commit'
[master (root-commit) 2790f58] Initial commit 1 file changed, 2 insertions(+) create mode 100755 silly-prog.sh
- git log
commit 2790f58a6d84cf07eb3ff3774be9583d1c2834a5 Author: Thomas Will <thomas.will@xinux.de> Date: Wed Dec 20 16:20:44 2017 +0100 Initial commit