Diferencia entre revisiones de «Práctica 2 14-15»

De Wiki de EGC
Saltar a: navegación, buscar
Línea 3: Línea 3:
 
* [[Clonando un repositorio existente]]
 
* [[Clonando un repositorio existente]]
 
* [[Iniciando un repositorio desde cero]]
 
* [[Iniciando un repositorio desde cero]]
 
+
* [[Realizando mi primer commit]]
= config =
+
* [[Revisando el historial de cambios]]
 
+
* [[Enviando cambios al servidor: push]]
git config --global user.email you@example.com
+
* [[Obteniendo cambios del servidor: pull]]
practica@LSI-160:~/test2.git$ git config --global user.email pneira@us.es
 
 
 
= commit =
 
 
 
git commit
 
 
 
= log =
 
 
 
git log
 
 
 
= push=
 
 
 
<source lang="bash">
 
$ git push origin master
 
Counting objects: 5, done.
 
Delta compression using up to 4 threads.
 
Compressing objects: 100% (2/2), done.
 
Writing objects: 100% (3/3), 329 bytes, done.
 
Total 3 (delta 0), reused 0 (delta 0)
 
To git@github.com:egc-profe/test2.git
 
  9d95b3f..b32395c  master -> master
 
</source>
 
  
 
= branch / checkout =
 
= branch / checkout =

Revisión del 22:40 29 oct 2014

branch / checkout

practica@LSI-160:~/test2.git$ git branch test
practica@LSI-160:~/test2.git$ git branch
* master
  test
practica@LSI-160:~/test2.git$ git checkout test
Switched to branch 'test'
practica@LSI-160:~/test2.git$ git branch
  master
* test
practica@LSI-160:~/test2.git$ git checkout master
Switched to branch 'master'
practica@LSI-160:~/test2.git$ git branch -D test
Deleted branch test (was b32395c).
practica@LSI-160:~/test2.git$ git branch 
* master

clone

git clone git@github.com:egc-profe/test2.git
Cloning into 'test2'...
remote: Counting objects: 9, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 9 (delta 0), reused 9 (delta 0)
Receiving objects: 100% (9/9), done.

revert

$ git log --oneline da883f2 add .gitignore file b32395c Update README file 9d95b3f This is my initial commit

$ git revert b32395c