Git: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Der Seiteninhalt wurde durch einen anderen Text ersetzt: „*git server *git client =links= *https://www.tutorialspoint.com/git/git_create_operation.htm *https://www.thomas-krenn.com/…“
Zeile 1: Zeile 1:
*[[git server]]
*[[git server]]
 
*[[git client]]
=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
==set the git server (to do only once)==
*git remote add origin gituser@git-server:project.git
==push to the master==
*git push origin master
<pre>
Counting objects: 3, done.
Writing objects: 100% (3/3), 250 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To gituser@git-server:project.git
* [new branch]      master -> master
</pre>
=another git client=
==copy id_rsa.pub to the git server==
*ssh-copy-id gituser@git-server:
==get project==
*git clone gituser@git-server:project.git
<pre>
Cloning into 'project'...
remote: Zähle Objekte: 3, Fertig.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), 250 bytes | 0 bytes/s, done.
Checking connectivity... done.
</pre>
*project/
*ls -l
<pre>
total 4
-rwxrwxr-x 1 tw tw 28 Dez 20 16:33 silly-prog.sh
</pre>
 
=links=
=links=
*https://www.tutorialspoint.com/git/git_create_operation.htm
*https://www.tutorialspoint.com/git/git_create_operation.htm


*https://www.thomas-krenn.com/de/wiki/Git_Server-Konfiguration
*https://www.thomas-krenn.com/de/wiki/Git_Server-Konfiguration

Version vom 27. Februar 2018, 15:50 Uhr