Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
apostila-git
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pet-estatistica
apostila-git
Commits
cf207028
Commit
cf207028
authored
9 years ago
by
Daniel Ikenaga
Browse files
Options
Downloads
Patches
Plain Diff
Atualiza os comandos e descrições do Cheat sheet
parent
7b5f0487
No related branches found
No related tags found
1 merge request
!16
Origin/issue#31
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cap08/cap08_cs.Rmd
+73
-42
73 additions, 42 deletions
cap08/cap08_cs.Rmd
with
73 additions
and
42 deletions
cap08/cap08_cs.Rmd
+
73
−
42
View file @
cf207028
...
@@ -3,45 +3,76 @@ title: "Cheat Sheet"
...
@@ -3,45 +3,76 @@ title: "Cheat Sheet"
output: html_document
output: html_document
---
---
.
Iniciando um Git
init
clone
config
Atividades Locais
status
add
commit
log
diff
blame
show
rm
mv
ls-files
Atividades Remotas
pull
push
remote
fetch
ls-remote
Branch (ramo)
branch
checkout
Merge (mesclar arquivos)
merge
Comandos Avançado
stage
stash
rebase
reset
revert
submodule
co
### Iniciando um Git
#### $ git init
Configura o diretório atual para um projeto Git
#### $ git config --global user.name "Seu nome"
Configura o nome que será visualizado nos commit
#### $ git config --global user.email "Seu email"
Configura o email que será associado ao seu nome
#### $ git clone git://github.com/usuario/projeto.git
Clona um projeto git já existente
### Atividades Locais
#### $ git status
Informa a situação do projeto
#### $ git add [arquivo]
Adiciona o arquivo a receber commit
#### $ git stage [arquivo]
O mesmo que git add
#### $ git commit - m "mensagem"
Grava a cópia atual dos arquivos no histórico de versão
#### $ git log
Lista o histórico de versão do branch atual
#### $ git log --follow [arquivo]
Lista o histórico de versão de um arquivo específico
#### $ git diff [branch 1] [branch 2]
Mostra a diferença entre dois branchs
#### $ git blame [arquivo]
Mostra quem editou cada linha de um arquivo específico
#### $ git show
Mostra as mudanças do último commit ou do especificado
#### $ git rm
Renomeia um arquivo sem perder o histórico
#### $ git mv
Move um arquivo sem perder o histórico
#### $ git ls-files
Lista todos os arquivos do branch atual
### Atividades Remotas
#### $ git pull
Copia as atualizações do servidor remoto para o local
#### $ git push
Copia as atualizações do computador local para o servidor
#### $ git remote [operação]
Executa as operações no servidor
#### $ git fetch
Atualiza as referências remotas
#### $ git ls-remote
Lista as referências remotas
### Branch (ramificação)
#### $ git branch
Lista todos os branchs no repositório local
#### $ git branch [novo branch]
Cria um novo branchs no repositório local
#### $ git checkout [branch]
Muda de branch
### Merge (mesclar arquivos)
#### $ git merge [branch]
Mescla o branch especificado ao atual
### Comandos Avançado
#### $ git stash
Armazena temporariamente as modificações dos arquivos
#### $ git rebase
Permite modificar todo o histórico dos commits
#### $ git reset
Desfaz todos os commit a partir do commit especificado
#### $ git revert
Reverte para um commit especificado
#### $ git submodule
Cria, atualiza ou inspeciona um submodulo (sub branch)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment