Comandos Git
Comandos Git
(main)
$ cd ejercicio
bash: cd: ejercicio: No such file or directory
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git add ejercicio02.txt
fatal: pathspec 'ejercicio02.txt' did not match any files
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Untracked files:
(use "git add <file>..." to include in what will be committed)
../bash.exe.stackdump
./
../sh.exe.stackdump
nothing added to commit but untracked files present (use "git add" to track)
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Untracked files:
(use "git add <file>..." to include in what will be committed)
../bash.exe.stackdump
./
../sh.exe.stackdump
nothing added to commit but untracked files present (use "git add" to track)
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git log
commit 811850fdd145de90aac1d0f7b37b7df063905920 (HEAD -> main)
Author: Victor Benitez <victor.benitez0@misena.edu.co>
Date: Thu Aug 5 22:09:50 2021 -0500
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git log --stat
commit 811850fdd145de90aac1d0f7b37b7df063905920 (HEAD -> main)
Author: Victor Benitez <victor.benitez0@misena.edu.co>
Date: Thu Aug 5 22:09:50 2021 -0500
actividad.txt | 0
1 file changed, 0 insertions(+), 0 deletions(-)
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Untracked files:
(use "git add <file>..." to include in what will be committed)
../bash.exe.stackdump
./
../sh.exe.stackdump
nothing added to commit but untracked files present (use "git add" to track)
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git add .
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: ejercicio02.txt.txt
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git commit -m "chore:se agrego"
[main 9bddbbf] chore:se agrego
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 ejercicio2/ejercicio02.txt.txt
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git commit --amend
[main fbc2561] chore:se agrego
Date: Fri Aug 6 18:49:01 2021 -0500
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 ejercicio2/ejercicio02.txt.txt
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git log
commit fbc2561bb945bd28d49bd6e20d29c896b089a761 (HEAD -> main)
Author: Victor Benitez <victor.benitez0@misena.edu.co>
Date: Fri Aug 6 18:49:01 2021 -0500
chore:se agrego
commit 811850fdd145de90aac1d0f7b37b7df063905920
Author: Victor Benitez <victor.benitez0@misena.edu.co>
Date: Thu Aug 5 22:09:50 2021 -0500
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git commit --amend
[main 17f57c0] chore:se agrego nuevamente
Date: Fri Aug 6 18:49:01 2021 -0500
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 ejercicio2/ejercicio02.txt.txt
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git log
commit 17f57c0e1f025b3dc254dd96ab7bd2b072bfa095 (HEAD -> main)
Author: Victor Benitez <victor.benitez0@misena.edu.co>
Date: Fri Aug 6 18:49:01 2021 -0500
commit 811850fdd145de90aac1d0f7b37b7df063905920
Author: Victor Benitez <victor.benitez0@misena.edu.co>
Date: Thu Aug 5 22:09:50 2021 -0500
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git push origin main
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/sena-ceet-students/semana03-
actividad01-VHBH.git/'
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ cd ejercicio2
bash: cd: ejercicio2: No such file or directory
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ touch ejercicio100.txt
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 2 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Untracked files:
(use "git add <file>..." to include in what will be committed)
ejercicio100.txt
nothing added to commit but untracked files present (use "git add" to track)
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git add .
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 2 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: ejercicio100.txt
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git restore --staged ejercicio100.txt
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 2 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Untracked files:
(use "git add <file>..." to include in what will be committed)
ejercicio100.txt
nothing added to commit but untracked files present (use "git add" to track)
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 2 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Untracked files:
(use "git add <file>..." to include in what will be committed)
ejercicio100.txt
nothing added to commit but untracked files present (use "git add" to track)
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git checkout --ejercicio100.txt
error: unknown option `ejercicio100.txt'
usage: git checkout [<options>] <branch>
or: git checkout [<options>] [<branch>] -- <file>...
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 2 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Untracked files:
(use "git add <file>..." to include in what will be committed)
ejercicio100.txt
nothing added to commit but untracked files present (use "git add" to track)
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git add .
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 2 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: ejercicio100.txt
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git restore --staged ejercicio100.txt
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 2 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Untracked files:
(use "git add <file>..." to include in what will be committed)
ejercicio100.txt
nothing added to commit but untracked files present (use "git add" to track)
FamiliaBenitezBurgos@FBenitezBurgos MINGW32
~/Desktop/semana03-actividad01-VHBH/ejercicio2 (main)
$
From https://github.com/sena-ceet-students/semana03-actividad01-VHBH