Difference between revisions of "IT-SDK-Git"

From wiki.samerhijazi.net
Jump to navigation Jump to search
m (Samerhijazi moved page IT-Tools-Git to IT-SDK-Git without leaving a redirect)
Line 1: Line 1:
 +
<pre class="code">
 +
</pre>
 +
==ssh==
 
<pre class="code">
 
<pre class="code">
 
type %userprofile%\.ssh\id_rsa.pub | clip
 
type %userprofile%\.ssh\id_rsa.pub | clip
 
cat %userprofile%\.ssh\id_rsa.pub | clip
 
cat %userprofile%\.ssh\id_rsa.pub | clip
  
 +
</pre>
 +
<pre class="code">
 +
==init 1==
 
git config --global user.name "Samer Hijazi"
 
git config --global user.name "Samer Hijazi"
git config --global user.email "Samer.Hijazi.Extern@fiduciagad.de"
+
git config --global user.email "samer.hijazi@samerhijazi.net"
  
 
git config --global credential.helper cache
 
git config --global credential.helper cache
Line 10: Line 16:
 
git config --global credential.helper wincred
 
git config --global credential.helper wincred
 
git config --global --edit
 
git config --global --edit
 +
 
git credential-manager version
 
git credential-manager version
 +
git config http.receivepack true
 +
git update-server-info
 +
</pre>
 +
 +
==init 1==
 +
<pre class="code">
 +
cd foldername
 +
git --bare init        # Initial Repo for remote
 +
 +
git init                # Initial Repo for local
 +
git remote add origin https://samerhijazi@gitlab.com/samerhijazi/public.git
 +
</pre>
 +
 +
==Workflow==
 +
<pre class="code">
 +
git clone ssh://ssh-w0000000@servername.com/www/htdocs/w0000000/repository/git/projectname.git
 +
git add README.md
 +
git commit -m "First commit"
 +
git push -u origin master
 +
</pre>
 +
==Branching==
 +
<pre class="code">
 +
git branch -m feature1 feature2          # To rename a local Git branch
 +
git push -u origin feature2:feature3    # To rename a remote Git branch
 
</pre>
 
</pre>

Revision as of 12:12, 31 October 2019




ssh

type %userprofile%\.ssh\id_rsa.pub | clip
cat %userprofile%\.ssh\id_rsa.pub | clip

==init 1==
git config --global user.name "Samer Hijazi"
git config --global user.email "samer.hijazi@samerhijazi.net"

git config --global credential.helper cache
git config --global credential.helper manager
git config --global credential.helper wincred
git config --global --edit

git credential-manager version
git config http.receivepack true
git update-server-info

init 1

cd foldername
git --bare init         # Initial Repo for remote

git init                # Initial Repo for local
git remote add origin https://samerhijazi@gitlab.com/samerhijazi/public.git

Workflow

git clone ssh://ssh-w0000000@servername.com/www/htdocs/w0000000/repository/git/projectname.git
git add README.md
git commit -m "First commit"
git push -u origin master

Branching

git branch -m feature1 feature2          # To rename a local Git branch
git push -u origin feature2:feature3     # To rename a remote Git branch