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
d0cabd26
Commit
d0cabd26
authored
9 years ago
by
Eduardo E. R. Junior
Browse files
Options
Downloads
Plain Diff
Merge branch 'issue#36' into 'devel'
Issue#36 Branch que possui os Exemplos de Rotinas. See merge request
!27
parents
702e59a6
ce5804cb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cap08/cap08_er.Rmd
+46
-3
46 additions, 3 deletions
cap08/cap08_er.Rmd
with
46 additions
and
3 deletions
cap08/cap08_er.Rmd
+
46
−
3
View file @
d0cabd26
Exemplos de Rotinas
===================
## Clonar, Modificar e Subir
## Clonar, Modificar e Subir
```{r, engine='bash', echo=TRUE, eval=FALSE}
```{r, engine='bash', echo=TRUE, eval=FALSE}
# Clonar o projeto desta apostila:
# Clonar o projeto desta apostila:
...
@@ -13,7 +18,6 @@ git push origin master
...
@@ -13,7 +18,6 @@ git push origin master
```
```
## Resolver conflito de merge
## Resolver conflito de merge
```{r, engine='bash', eval=FALSE, echo=TRUE}
```{r, engine='bash', eval=FALSE, echo=TRUE}
# Requisitar merge:
# Requisitar merge:
git merge ramo_teste
git merge ramo_teste
...
@@ -28,14 +32,35 @@ git commit -a -m "Merge do ramo_teste"
...
@@ -28,14 +32,35 @@ git commit -a -m "Merge do ramo_teste"
## Incorporar o remoto ao local
## Incorporar o remoto ao local
```{r, engine='bash', eval=FALSE, echo=TRUE}
```{r, engine='bash', eval=FALSE, echo=TRUE}
# Listando os servidores remotos:
git remote
# Adicionando novo remote com nome remoto:
# Adicionando novo remote com nome remoto:
git remote add remoto git@gitlab.c3sl.ufpr.br:pet-estatistica/apostila-git.git
git remote add remoto git@gitlab.c3sl.ufpr.br:pet-estatistica/apostila-git.git
# Atualizando arquivos locais:
git pull
```
## Resolver um bug
```{r, engine='bash', eval=FALSE, echo=TRUE}
git branch bugfix
git checkout bugfix
# Modifica o código de acordo com o necessário.
git commit -a -m "Bug corrigido"
git checkout master
git merge bugfix
git branch -d bugfix
```
```
## Deletar
R
amos
## Deletar
r
amos
```{r, engine='bash', echo=TRUE, eval=FALSE}
```{r, engine='bash', echo=TRUE, eval=FALSE}
# Listar ramos:
git branch
# Deletar ramo local:
# Deletar ramo local:
git branch -d "nome_ramo"
git branch -d "nome_ramo"
# Deletar ramo remoto:
# Deletar ramo remoto:
...
@@ -56,4 +81,22 @@ git checkout novo_branch
...
@@ -56,4 +81,22 @@ git checkout novo_branch
```
```
## Voltar o projeto para um commit
```{r, engine='bash', echo=TRUE, eval=FALSE}
# Listando commits pelo nome e código de identificação:
git log --pretty=oneline
# Voltando a um commit anterior, em que seu código
#de identificação é: ec3650c8661d75b486a236e3d416ab58db1d596a.
git checkout ec3650c8661d75b486a236e3d416ab58db1d596a
```
## Reescrever mensagem de commit
```{r, engine='bash', echo=TRUE, eval=FALSE}
git log --oneline
git commit --amend "Correção de Commit"
git push -f origin master
```
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