snipt

Ctrl+h for KB shortcuts
#55516

Bash

Asosciar git

1
2
3
#Asosiamos el repositorio local con el online
#Donde USERNAME y REPOSITORIO los cambiamos el usuario y nombre del repositorio 
git remote add origin git@github.com:USERNAME/REPOSITORIO.git
https://snipt.net/embed/59e613b38f3bbac3a6d080ac2b77aaec/
https://snipt.net/raw/59e613b38f3bbac3a6d080ac2b77aaec/
59e613b38f3bbac3a6d080ac2b77aaec
bash
Bash
3
2014-04-07T17:08:19
True
False
/api/public/snipt/55516/
asosciar-git
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c">#Asosiamos el repositorio local con el online</span> </span><span id="L-2"><a name="L-2"></a><span class="c">#Donde USERNAME y REPOSITORIO los cambiamos el usuario y nombre del repositorio </span> </span><span id="L-3"><a name="L-3"></a>git remote add origin git@github.com:USERNAME/REPOSITORIO.git </span></pre></div> </td></tr></table>
#55514

Bash

Configuración local GIT

1
2
3
4
5
6
*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"
https://snipt.net/embed/22c36853a119e8f2347ccd582e299214/
https://snipt.net/raw/22c36853a119e8f2347ccd582e299214/
22c36853a119e8f2347ccd582e299214
bash
Bash
7
2014-04-07T18:54:39
True
False
Feb 09, 2013 at 11:04 AM
/api/public/snipt/55514/
configuracion-local-git
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>*** Please tell me who you are. </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>Run </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a> git config --global user.email <span class="s2">&quot;you@example.com&quot;</span> </span><span id="L-6"><a name="L-6"></a> git config --global user.name <span class="s2">&quot;Your Name&quot;</span> </span></pre></div> </td></tr></table>
#55513

Bash

Commit

git commit -m 'comentario'
https://snipt.net/embed/8e9814ddaebcd0a02d0af3ce42bdd212/
https://snipt.net/raw/8e9814ddaebcd0a02d0af3ce42bdd212/
8e9814ddaebcd0a02d0af3ce42bdd212
bash
Bash
2
2014-04-04T16:58:34
True
False
Feb 09, 2013 at 10:58 AM
/api/public/snipt/55513/
commit-1
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>git commit -m <span class="s1">&#39;comentario&#39;</span> </span></pre></div> </td></tr></table>
#55512

Bash

git add

1
2
3
4
5
#agrega un solo archivo
git add archivo

##agrega todos los archivos
git add .
https://snipt.net/embed/b5afef6048cdafa7816317bad54cc05b/
https://snipt.net/raw/b5afef6048cdafa7816317bad54cc05b/
b5afef6048cdafa7816317bad54cc05b
bash
Bash
7
2014-04-15T19:38:11
True
False
Feb 09, 2013 at 10:52 AM
/api/public/snipt/55512/
git-add
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c">#agrega un solo archivo</span> </span><span id="L-2"><a name="L-2"></a>git add archivo </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="c">##agrega todos los archivos</span> </span><span id="L-5"><a name="L-5"></a>git add . </span></pre></div> </td></tr></table>
#55511

Bash

Crar README

touch README.md
nano README.md
https://snipt.net/embed/da35379c8172cc64e4a481c82a7c3ab7/
https://snipt.net/raw/da35379c8172cc64e4a481c82a7c3ab7/
da35379c8172cc64e4a481c82a7c3ab7
bash
Bash
2
2014-04-09T17:59:45
True
False
Feb 09, 2013 at 10:44 AM
/api/public/snipt/55511/
crar-readme
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>touch README.md </span><span id="L-2"><a name="L-2"></a>nano README.md </span></pre></div> </td></tr></table>
#54554

Bash

CorreoUsuario

1
2
3
git config --global user.name "Nombre Completo"
git config --global user.email "correo@electronico.com"
git config --global github.user username
https://snipt.net/embed/67b55eeca0d0e47e6b89ef3e2eec1aad/
https://snipt.net/raw/67b55eeca0d0e47e6b89ef3e2eec1aad/
67b55eeca0d0e47e6b89ef3e2eec1aad
bash
Bash
3
2014-04-14T12:25:20
True
False
Jan 26, 2013 at 01:06 PM
/api/public/snipt/54554/
correousuario
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>git config --global user.name <span class="s2">&quot;Nombre Completo&quot;</span> </span><span id="L-2"><a name="L-2"></a>git config --global user.email <span class="s2">&quot;correo@electronico.com&quot;</span> </span><span id="L-3"><a name="L-3"></a>git config --global github.user username </span></pre></div> </td></tr></table>
#54552

Bash

Verificar llave

ssh -T git@github.com
https://snipt.net/embed/5dd74eae99236b4c5870899c8efd60de/
https://snipt.net/raw/5dd74eae99236b4c5870899c8efd60de/
5dd74eae99236b4c5870899c8efd60de
bash
Bash
1
2014-04-03T10:57:51
True
False
/api/public/snipt/54552/
verificar-llave
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>ssh -T git@github.com </span></pre></div> </td></tr></table>
#54549

Bash

Instalar GIT

1
2
3
4
5
6
#archlinux
pacman -S git

#ubuntu, debian

sudo aptitude install git
https://snipt.net/embed/2150e7a0d111fbe5ce3c46d134e1e6d9/
https://snipt.net/raw/2150e7a0d111fbe5ce3c46d134e1e6d9/
2150e7a0d111fbe5ce3c46d134e1e6d9
bash
Bash
6
2014-04-12T07:12:36
True
False
Jan 26, 2013 at 11:41 AM
/api/public/snipt/54549/
instalar-git-1
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c">#archlinux</span> </span><span id="L-2"><a name="L-2"></a>pacman -S git </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="c">#ubuntu, debian</span> </span><span id="L-5"><a name="L-5"></a> </span><span id="L-6"><a name="L-6"></a>sudo aptitude install git </span></pre></div> </td></tr></table>