You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.3 KiB
56 lines
1.3 KiB
GIT Librography
|
|
|
|
git add .
|
|
git commit -m "mensagem"
|
|
# Enviar mudanças (ambos)
|
|
git push origin master
|
|
|
|
# atualizar arquivos do repositorio remoto para o local
|
|
git pull origin master
|
|
|
|
#Rotulando (o 1b2e1d63ff representa os 10 primeiros caracteres do id de commit)
|
|
git log
|
|
git tag 1.0.0 1b2e1d63ff
|
|
|
|
# Branchs
|
|
git checkout -b funcionalidade_x
|
|
# retorne para o master usando
|
|
git checkout master
|
|
# e remova o branch da seguinte forma
|
|
git branch -d funcionalidade_x
|
|
# envie o branch para seu repositório remoto
|
|
git push origin <funcionalidade_x>
|
|
|
|
# merge (para fazer merge de um outro branch ao seu branch ativo)
|
|
git diff <branch origem> <branch destino>
|
|
git merge <branch>
|
|
|
|
# sobrescrever alterações locais
|
|
git checkout -- <arquivo>
|
|
# ou recupere o histórico mais recente do servidor
|
|
git fetch origin
|
|
git reset --hard origin/master
|
|
|
|
@Github
|
|
# git init
|
|
git add .
|
|
git commit -m "mensagem"
|
|
git remote -v
|
|
git config --global core.compression 0
|
|
git config --global pack.window 1
|
|
git push -u github master
|
|
|
|
@Gitea
|
|
git push origin master --force
|
|
|
|
|
|
- erro de disconnect github push
|
|
# git config --global core.compression 0
|
|
|
|
### Manage urls git remote ####
|
|
git remote -v
|
|
git remote add github git@github.com:flashlan/Librography.git
|
|
|
|
# setar multiplos remotes para atualizar com um comando (push)
|
|
git remote set-url --add --push origin git@github.com:flashlan/Librography.git
|
|
|
|
|