GIT - Juliniho/Pitagoras GitHub Wiki
Command line instructions
You can also upload existing files from your computer using the instructions below.
Create a new repository
git clone https://domain/glpi.git
cd glpi
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
Push an existing folder
cd existing_folder
git init
git remote add origin https://domain/glpi.git
git add .
git commit -m "Initial commit"
git push -u origin master
Push an existing Git repository
cd existing_repo
git remote rename origin old-origin
git remote add origin https://domain/glpi.git
git push -u origin --all
git push -u origin --tags
PortatilOut@DESKTOP-U5R84OQ MINGW64 ~/Desktop/Projects/UAB/AdvancedJava-stw-c4-19 (version_FINAL)
-donde estamos:
$ git status
$ git branch -a
-seleccionamo:
$ git checkout master
-actualizamos
git pull --no-ff origin master
-merge de master con lo que hay en version_FINAL:
git merge --no-ff version_FINAL
-nos pide login name:
git config user.name "juliniho"
-nos pide login e-mail:
$ git config user.email "[email protected]"
$ git merge --no-ff version_FINAL
- subimos al repo
$ git push origin master
=================================
Creacion ficheros dentro de un repositorio
nos descargamos en local el git-repositirio
$ git clone https://gitlab.com/Juliniho/nextcloud.git
Cloning into 'nextcloud'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
nos desplazamos al directorio
$ cd nextcloud/
creamos ficheros y los agregamos
$ touch configuracionNextcloud.md
$ git add configuracionNextcloud.md
nos registramos
$ git config user.name "juliniho"
$ git config user.email "[email protected]"
hacemos el commit y comentamos
$ git commit -m "creacion configuracion"
[master 066462c] creacion configuracion
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 configuracionNextcloud.md
Hacemos la subida
$ git push origin master
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 303 bytes | 151.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://gitlab.com/Juliniho/nextcloud.git
66f63c5..066462c master -> master