micro-joan / D4TA-HUNTER

GUI Osint Framework with Kali Linux
130 stars 25 forks source link

Rebase historial de commits #6

Open pabloqpacin opened 1 year ago

pabloqpacin commented 1 year ago

Reducir historial de commits

NOTA: Los cambios en los archivos que aparecen en esta Pull Request son todas las ediciones que se han ido haciendo durante las últimas 9 commits.

Iniciar git rebase de las últimas 9 commits

# Clonar mi fork en mi ordenador
git clone git@github.com:pabloqpacin/D4TA-HUNTER.git
cd ~/path/D4TA-HUNTERS
# Git log con un formato determinado usando el alias 'glol'
git status
git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'

2-contarCommits

# Iniciar proceso de rebase interactivo en la terminal
tldr git rebase
git rebase -i HEAD~9

Aplicar squash en Vim

1. Cambiar pick por squash

# Replace PICK for SQUASH except first line (oldest commit from HEAD)
j           # move cursor to line 2, first letter first word
Ctrl+B      # enter VISUAL BLOCK mode -- key binding might be different
lll         # select next three letters, (complete word 'pick')
jjjjjjj     # selecting 'pick' IN all lines but the first
s           # substitute selected text and enter INSERT MODE
squash      # will do squash operation -- displayed in only one line atm
kj          # <Esc> INSERT mode -- see 'squash' displayed in all lines!!
:wq         # write and quit to the next screen

3-pickForSquash

2. Dejar fuera mensajes de commits

# Now just comment out all the instances of 'Update README.md' but one :)
3j          # go down 3 lines -- leave the first 'Update README.md' as it is
3j          # go down 3 lines
I           # enter INSERT mode at the beginning of the line
'# '        # type 1 pound and 1 space
kj          # <Esc> INSERT MODE
3j          # go down 3 lines
# REPEAT until all 'Update README.md' instances are commented out excepct the first
:wq         # write and quit -- LIKELY SUCCESS!!

4-commentRepetitions

Push cambios a HEAD en el repo remoto

git status
glol | grep "("

5-totalCommits

6-graficoRebase

# Aplicar los cambios y pushear al repo remoto
git status
git push origin +main

7-pushRebase

1-historialCommitsGithub

0-historialCommitsGithubFORK