Open olodrim opened 4 years ago
$ git config --global alias.co checkout
$ git config --global alias.br branch
$ git config --global alias.ci commit
$ git config --global alias.st status
Renombrar Tags de git Here is quick tip to rename a git tag in the remote repo.
Step 1: Create a new tag on the same commit point of old tag and push it, git tag new_tag old_tag git push --tags
Step 2: Delete the old tag from local repo. git tag -d old_tag
Step 3: Delete the old tag from remote repo. git push origin :refs/tags/old_tag
You can verify the changes made, by executing the below command. It shows all remote tags: git ls-remote --tags origin
GIT REBASE multiple
Quiero hacer un rebase con mi proia rama para squashar N commits git rebase -i HEAD~3
git commit --amend --author "Stephanie Burckhardt stephanie.burckhardt@beetrack.com" --no-edit && \
git commit --amend --author "Stephanie Burckhardt stephanie.burckhardt@beetrack.com" --no-edit && \ git rebase --continue
Generar Ramas
git branch git branch --help
En nuestra rama master
git log
Vemos el historial de cambios (Autor, SHA, y donde está el HEAD)git branch
Lista las ramas disponiblesGenerar rama development
git branch development
Creamos rama developmentgit checkout development
Cambiamos a rama developmentgit log
Vemos y comparamos que es una clonacion de la rama master al momento que hicimos el git branchgit push -u origin development
Generar rama feature/rama1
git branch feature/rama1
Creamos rama feature/rama1git checkout feature/rama1
Cambiamos a rama feature/rama1Creando commits en rama 1
Add e and f files
touch e.txt
touch f.txt
git add .
git commit -m "feat: Add e and f files"
Add g and h files
touch g.txt
touch h.txt
git add .
git commit -m "feat: Add g and h files"
Add i and j file
touch i.txt
touch j.txt
git add .
git commit -m "feat: Add i and j files"
Respaldo de rama para futuros trabajos
git branch feature/rama2
git branch
: Comprobamos que la rama existagit checkout feature/rama2
git push origin feature/rama2
git branch feature/rama3
git branch
: Comprobamos que la rama existagit checkout feature/rama3
git push origin feature/rama3
Generamos push de rama para ver en github
git push origin feature/rama1
Fin ???
Cosas Extras
Cherrypick Existe Gitflow Hubflow Pero esto puede ser otro code kata