Arquivo do Autor: marcoscarvalho

Notes About HTTP and Servlets

Which of the following are correct statements regarding HTTP polling?
Since a client does not have direct access to any server-side state, the client may waste resources by polling the server for updates when there are none.
Dynamically adapting the polling interval is one approach to reducing unnecessary HTTP requests.
Polling can generate excess load on a server if the polling interval is too short.

 

Which of the following are true of Push Messaging?
If the state that needs to be pushed to a client is extremely sensitive, a "push to poll" model where the server sends a push notification and then the client polls for a state update is most appropriate
If the state that needs to be pushed to a client is extremely large (e.g., multiple megabytes), a "push to poll" model where the server sends a push notification and then the client polls for a state update is most appropriate
Push messaging relies on a persistent connection between a mobile device and a push messaging system's servers

 

Which of the following are true statements about Servlets?
A servlet has doXXXX methods for each type of request method that can be sent to the server

 

Which of the following is true about handling client input data in a servlet?
A servlet can access url encoded parameters placed in the body of a request sent by a client
A servlet can access URL query parameters sent by a client

 

Which of the following are true statements regarding request routing and servlets?
A web.xml file can be used to specify which requests should be routed to which servlets
Requests can be routed to different servlets based on the resource path specified in the request

 

Which of the following could lead to an injection attack?
Failing to verify that the type of data sent to the server is what was expected
Storing client-provided data without filtering it and then resending it to other clients
Allowing client-provided data to control an execution path involving sensitive data
Echoing executable client-provided data back to the client without filtering it

 

Which of the following are true statements regarding client-provided data?
None of the below are correct:

  • Careful filtering of client-provided data is not needed if only one type of client is expected to ever use a cloud service
  • Careful filtering of client-provided data is not needed if the same developer writes the mobile client and the cloud service
  • Because client-provided data is so hard to filter, a cloud service should never accept a body in an HTTP request
  • Client-provided data in URL query parameters is always safer than the same data provided in a URL encoded request body

 

Enjoy
Marcos de Carvalho Oliveira

Notes About Protocol and HTTP

What are the components of a protocol?
Semantics
Syntax
Timing

 

What is HTTP?

A communication protocol that is based on a client/server model
A communication protocol commonly used by web browsers

 

What are some of the reasons that HTTP is commonly used for mobile to cloud communication?
There is significant existing investment and infrastructure for HTTP communication

 

What are HTTP request methods?
An indication of an action that a client would like the server to apply to a resource

 

Which of the following are possible components of an HTTP request?
A Content-type for a body included with the request
Headers
A Request Body
Request Line

 

What is URL encoding?
An alternative representation of certain characters that can be placed in a URL

 

What is the purpose of the content-type header?
To tell either the client or server the format of the data included in a request or response body

 

What is the purpose of the numeric code included in the status line of an HTTP response?
To provide an indication of what happened when the server processed the request

 

Which of the following are possible outcomes of a request that a server could indicate with a 2XX response code?
The request was successfully processed

 

Which of the following are true of cookies?
They are small pieces of data that the server indicates should be included by the client in future requests

 

Enjoy
Marcos Carvalho

[Composing – 10] Curitiba Marathon

Last year I ran the Curitiba Marathon. Everyone should run a marathon someday. Because my first marathon was unforgettable. I have prepared myself for this moment for about six months. These six months were very difficult.

I believe that everyone should run a marathon because it requires work hard. Every day in last year, I woke up at six am to run or go to gym. The marathon became one of the major goals of my life. I trained hard and I completed this running in three hours and fifty-three minutes. I suffered a lot in the final moments and in the end, I cried a lot.

This goal was important to me because I have started, I have realized and I have finished it. I have learned once again in my life how I should do everything. The feeling of completing something is amazing. I believe that after this moment I became a better person.

This feeling was when I completed the marathon. Try. Feel it. It is important for you.

Marcos de Carvalho Oliveira
13/06/2014

[Composing – 09] Things I have done in my life

My life is amazing. I started my paragraph like this because I like to live. I like to remain alive. In my life, I have been dating my wife since 2003. I started dating in May sixth, 2003. We have studied on CEFET in Goiânia. We have visited many cities and often, we travelled. In 2004, we went to Pirenópolis and we stayed in Pousada Mandala. This city has many waterfalls and good vibrations. In 2004, we went to São Jorge and stayed in Pousada Casa das Flores. This inn in excellent and the city has many waterfalls too.

However, I have many dreams that I would still like to do. Examples - I have not visited Orlando in the United States. I have not climbed Mount Everest. I have not gone surfing in winds of Hawaii. I and my wife have not gone to Punta Cana. Now, I wanted to have done but I have not: I have not finished my university and I would like to have more sons. This is my life. Adventures and challenger waiting me.

Marcos de Carvalho Oliveira
06/06/2014

[Composing – 08] Living in a house is better than living in a flat

Living in a house is better than living in a flat. Firstly, flats are smaller than any house. Secondly, buildings has increasingly dweller’s number. Therefore, the trouble and noise in these buildings are common. Finally, I would like to increase my privacy because every day, we have less.

I have been living in a flat since I was born. My wife used to live in a house when she was not married. Then, we would have more space because we want to have more children and them need space to walk and run. We would like to have a Labrador Retriever, a Golden Retriever or both. I would like to have a garden and take care of it. When we stay at home, in a flat, sometimes we feel arrested and we feel the necessity to go out.

The noise is a difficult problem. We have been listening noise of flats around our apartment every day. When people discuss among themselves, sometimes we got a conclusion of who is right. The trouble with neighbors are frequent. It is difficult to building manager take care of it. In the building that we live, there are hundred sixty flats. There are days that the building manager is crazy because every neighbor wants something different.

Our next home will be a house for sure. We will have the common problems like to how take care of it or keep it safe for us, but we have privacy. I am sure that this feeling of being arrested will decrease. We will have space for our children and space for us.

Marcos de Carvalho Oliveira
06/06/2014

[Composing – 07] Dark Tower

Dark Tower is the biggest series of books written by Stephen King. These books tell the story of "gunslinger" and his fight toward a tower named "Dark Tower".

Dark Tower is a magic tower and it has the power to remain all things in its right order. However, there is something or someone that tries to corrupt it and it got its power.

The gunslinger is a strange guy. When you read about gunslinger you think he is a bad guy. However, readers discover that “Roland Deschain” has proposes and goals extremely defined. He feels that something happens with the Dark Tower and he tries to save it.

In the middle of the story, we discover that the tower lost its force and a simple flower is fighting against dark forces.

The series is excellent and it makes us about think about our lives, in our behaviors, and the person that we might be. King likes to discuss about people and how people act. Because of these facts the story is amazing.

Marcos de Carvalho Oliveira
30/05/2014

[Composing – 05] Is everything conspiracy?

Elvis Presley faked his own death. The Aids virus was create in a laboratory. Global warming is a hoax. These are conspiracy theories hard to believe. However, could not these conspiracy theories be true?

I did not live when Presley was alive. He should not have had peace in his life. Maybe, he decided to change his life and he has hidden. Some say he died in the ninetieths. It could have happened, mainly because his death happened very fast and it was very strange. He died at home after he went to the dentist. Perhaps, he went to Mars and he liked the Martians.

Dr. William Campbell Douglass said that HIV was genetically engineered in 1974. I don’t know his theories but I believe in it. I believe that HIV was created in a laboratory and many companies, nations earn money with HIV. AZT is the main drug and it is very expensive. We are in 2014. HIV is forty years old. It is difficult to believe that there isn’t a vaccine for Aids. Some people say that HIV was created to control the number of people and reduce the world population. We have vaccine for everything, but HIV.

Sceptics believe that Global Warming is a conspiracy theory because the government includes taxes to people, increases the control and authoritarian of government. This could be true. Therefore, everyone realizes the difference in climate. Something is happening. We are destroying the environment. There are more people in the world. The animals are disappearing. These facts trend grow very fast over time.

We don’t know If conspiracy theories are facts or not. Because of these, some people increase stories and create jokes. Anyway, we have many questions about it.

Marcos de Carvalho Oliveira
16/05/2014

[Composing – 04] How far should you go online?

There is no limit to go online. However, it became a social problem. The first problem is that there are many companies that have been filtrating our search and reading our emails. Second, is how far you must go online? Third question is if there must be limits.

The first problem above is terrible. There are companies that read our emails. When they do that, they know everything about our lives. However, this do not main problem. The real problem is that companies filtrate options and show for us other companies and relational stuff of their interest. There are many people protesting for it and others like that. We have to remember that companies work to earn more money. There is always have some manipulation to earn more money. So, how do you read or listen protest about it if the internet manipulated?

We have to emphasize in people and relationship. When we go deep in to something, we forget the side of the coin. However, if you want to go ahead in a study or in our work, the correct it is to specialize.

Of course, limits should be constructed and it has happens over time. Every person has your own limit. However, there are people that lost the control of their life. Post many things in internet without necessity and check the messages all the time. It became a society of superficial people and sire new problems.

We like to be connected and informed. However, people lost control about it. Whom the companies cannot insert in this earth yet, it is your goal too. We need know controlling it. We need values. We need friends. We need talk. We need live our life. The technology helps us but we know separate it and live the life without connected too.

Marcos de Carvalho Oliveira
09/05/2014

[Composing – 03] Dubai’s Airport

Last Saturday, I watched in Discovery Channel a program about Dubai’s airport. This documentary shows three workers of the airport and showed their responsibilities.

The first worker aim is to control the time of the aircraft on the ground. He is a manager that controls other workers’ jobs. The aircraft that he controls in the moment of the documentary is an A380 and the aircraft can stay three hours on the ground.

He has many problems and each problem is different. One of the problems was a luggage door. It was a giant door and it delayed the luggage of five hundred sixty passengers. Usually other problems happen with special needs people and the passengers that are late for the flight.

The second worker is a woman that controls the cleaners. The cleaners have about forty minutes to clean the entire airplane. However, they were late because the aircraft was not free to clean. They can only clean the aircraft if the passengers left it. It happens all the time. After passengers release the plane, cleaners finished their job in twenty minutes.

The third worker has the function of clearing the runway of the aircraft. When one aircraft is landing, it loses a lot of tire rubber and the track gets slippery over time. It takes 3 hours to clean each track per week and if the runway is not completely clean, the track keeps closed. In this airport, there are four tracks. One track closed, it means many passengers without flying.

In the end of the program, workers end their jobs. They are tired but pleased and waiting for the next flight.

Marcos de Carvalho Oliveira
24/04/2014

[Composing – 02] Necessity of learning English

English is a widely spoken language in the world. However, what is the real necessity of learning English in a country that it is not the native language?

I have been studying English mainly to talk and understand the world around me. The majority of the books are writen in English. When someone writes about a new technology for sure, his book will be in English. Therefore, if you do not speak English, and if this new technology really get the majority of companies, perhaps this book will be translate to Portuguese.

MOOC, or “Massive Open Online Course”, is a tendency important for us from IT. If you do not participate at least once a year, you will be late. Unfortunately, the most of these courses are in English.

Now, learning English is a mania that many people have acceded. This is not a reason to judge people. It is an interesting tendency mainly because the people are studying it and this is great. Another reason is that Portuguese there are many words in English that people say all the time. How not to be interested?

Therefore, English is very important. Of course, that each one has their opinion about it, but not studying English is not an option anymore.

Marcos de Carvalho Oliveira
04/05/2014

[Composing – 01] Do you think money affects the level of your happiness? How much money do you need to be happy?

Money affects the level of happiness and the others lives. We need money to pay bills, buy things, have a social life, pay courses and trips. However, our lives have values that are not measurable and often we try to calculate the simple values with money.

Which are the important values for you? Love, family, the fellowship that we have in common, the affection, and the time that we do not have anymore. Usually, we put other activities in our free time and It causes a series of problems, for example: We do not have time to give people that want to be with us; time to think of real things; time to do charity. When we do this, we decrease the value mentioned above.

What is wrong? Each one has to think more about this. We usually sell our time to pay more bills or other useless things. Where are values if I sell all time? We do not have love if we do not have time to cultivate it.

If you have much money, do you stop looking for it? I do not have enough to think of it. People that have enough money cannot answer this question because they would like to do many things with the money that they have not earned yet.

Marcos de Carvalho Oliveira
03/05/2014

[C#] Manipulação de Dados

Manipulação de Dados com o Objeto SqlConnection:

public List buscarClientes()
{
    string query = @"select * from [dbo].[clientes]";

    string conexao = ConfigurationManager.ConnectionStrings[BANCO].ConnectionString;
    SqlConnection conn = new SqlConnection(conexao);

    SqlCommand comando = conn.CreateCommand();
    comando.CommandText = query;

    conn.Open();
    SqlDataReader reader = comando.ExecuteReader();
    List list = RetornarClientes(reader);
    conn.Close();

    return list;
}

private List RetornarClientes(System.Data.SqlClient.SqlDataReader reader)
{
    List list = new List();
    while (reader.Read())
    {
        list.Add(RetornarCliente(reader));
    }

    return list;
}

private Cliente RetornarCliente(System.Data.SqlClient.SqlDataReader reader)
{
    Cliente cliente = new Cliente();
    cliente.Id = (String)reader["cliente_id"];
    cliente.Nome = (String)reader["nome"];
    cliente.Sobrenome = (String)reader["sobrenome"];
    cliente.Rua = (String)reader["rua"];
    cliente.Cidade = (String)reader["cidade"];
    cliente.Estado = (String)reader["estado"];
    cliente.Cep = (String)reader["cep"];

    return cliente;
}

 

Manipulação de Dados com o Objeto OleDbConnection:

public List buscarClientesAccess()
{
    string query = "select * from [clientes]";

    OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|BancoMA.mdb");
    OleDbCommand comando = conn.CreateCommand();
    comando.CommandText = query;

    conn.Open();
    OleDbDataReader reader = comando.ExecuteReader();
    List list = RetornarClientes(reader);
    conn.Close();

    return list;
}

private List RetornarClientes(OleDbDataReader reader)
{
    List list = new List();

    while (reader.Read())
    {
        list.Add(RetornarCliente(reader));
    }

    return list;
}

private Cliente RetornarCliente(System.Data.OleDb.OleDbDataReader reader)
{
    Cliente cliente = new Cliente();
    cliente.Id = (String)reader["cliente_id"];
    cliente.Nome = (String)reader["nome"];
    cliente.Sobrenome = (String)reader["sobrenome"];
    cliente.Rua = (String)reader["rua"];
    cliente.Cidade = (String)reader["cidade"];
    cliente.Estado = (String)reader["estado"];
    cliente.Cep = (String)reader["cep"];
    return cliente;
}

 

Recuperando um array de Object de uma DataGridView:

private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
    Object o = dataGridView1.Rows[e.RowIndex].DataBoundItem;
    System.Data.DataRowView asdf = (DataRowView) o;
    object[] os = asdf.Row.ItemArray;
}

 

Arquivo de Exemplo: Avaliacao20140414 e 20140610

Enjoy
Marcos Carvalho

[GP] Conceitos

Padrão
Um documento formal que descreve normas, métodos, processos e práticas estabelecidas.

Boas Práticas
Consenso geral de que a aplicação correta de habilidades, ferramentas e técnicas podem aumentar as chances de sucesso.

O que é um Projeto?
Esforço temporário para criar-se algo.
Início e fim definidos.
Algo: produto, serviço, um resultado exclusivo, etc.
Término:
  1. Objetivos tiverem sido atingidos;
  2. Concluir que os objetivos não serão ou não poderão ser atingidos; 
  3. Quando não for mais necessário.

Cada projeto é EXCLUSIVO (possuem natureza única)
Cada projeto tem seu momento, circunstâncias, fornecedores, incertezas, etc.

O que é Gerenciamento de Projeto?
Aplicação de conhecimentos, habilidades, ferramentas e técnicas nas atividades a fim de atender requisitos.

Grupos de Processos
Iniciação;
Planejamento;
Execução;
Monitoramento e Controle;
Encerramento.

Gerenciar Projetos
Identificação de requisitos;
Adaptação as necessidades;
Preocupação e expectativas das partes interessadas;
Balanceamento das restrições conflitantes.

Restrições Conflitantes
Escopo;
Qualidade;
Cronograma;
Orçamento;
Recurso;
Risco;
Etc.

Notas
Quando qualquer restrição for alterada, SEMPRE outra(s) restrição(ões) será(ão) afetada(s).
Mudanças dos requisitos do projeto, podem criar riscos adicionais.
Todo projeto é ITERATIVO. Melhoria contínua que leva a um gerenciamento em um maior nível de detalhes.

Enjoy
Marcos Carvalho

Dicas Para o Desenvolvimento Pessoal

OBS: Esse texto não pertence a mim e estou postando porque é algo que sempre irei reler e reler e ...

O desenvolvimento pessoal é o primeiro passo para o desenvolvimento profissional. Pensando assim, sempre valem mas algumas dicas, certo? Então vamos a elas:

1 - Inove e mude

Mudanças são inevitáveis para o seu crescimento;

2 - Trabalhe mais e de forma mais inteligente

Um empregado simplesmente tem que fazer o que lhe é mandado e depois vai para casa, mas quem faz mais do que suas obrigações sempre é notado e beneficiado;

3 - Não invente desculpas

Assuma responsabilidade do que der errado, assim você pode identificar o problema e corrigi-lo;

4 - Domine seu tempo

Trabalhe de forma inteligente; organize-se e estabeleça prioridades, foque no que realmente importa;

5 - Saia da zona de conforto

Isso combina com a escolha de mudar, desenvolva novas habilidades e aprimore as antigas. Evolua!;

6 - Comunique-se

Tenha certeza de que as pessoas entendem o que você fala e se não entenderem, faça de tudo para que passem a entender;

7 - Lidere através do exemplo

É mais fácil motivas as pessoas através de ações do que de palavras;

8 - Encare riscos

Não se preocupe em falhar ou cometer erros, isso acontece com todo mundo. Ninguém consegue nada sem tentar;

9 - Seja flexível

Com seu tempo, suas atitudes, seus amigos, com tudo, exceda seus princípios;

10 - Domine

Seja confiante, tome decisões e permaneça fiel a elas, mas não se esqueça de ser flexível quando achar necessário;

11 - Não se contente com a média

Sempre trabalhe para chegar ao seu melhor, mantenha-se em um alto padrão. Ninguém cresce fazendo o mínimo possível;

12 - Respeite sua intuição

Sempre vão existir pessoas que tentam crescer te jogando para baixo, ignore-as. Dê ouvidos somente à você mesmo e aqueles que querem que você cresça.

Enjoy

Marcos Carvalho

­­

[HowTo] – [Git]

git init
Iniciar o versionamento dentro de uma pasta;
Criará um diretório .git;
Para fazer backup com todo histórico, apenas copiar o diretório .git.

git init --bare
Cria o repositório com as mesmas pastas que o git criaria dentro da pasta .git;
A pasta .git não existe nesse cenário;
Cria um repositório sem área de trabalho.

git status
Mostra o Status que está o Working Area e o Índice.

git add <>
Adicionar ao índice;
Dentro do <>, adicionará arquivos, arquivos de um tipo, ou tudo;
. ou * é igual a tudo;
Para arquivos de um tipo. Exp: *.java;
Caso tenha modificado o arquivo depois de ter adicionado ao índice, terá que refazer esse passo.

git add -i
Mostra um menu de opções para trabalhar em cima do Working Area X Índice.

git rm --cached <file>
Retira o arquivo do índice.

git commit -m "Mensagem para o commit que está fazendo. O Mesmo que histórico."
Envia ao repositório;
Grava o conteúdo do índice no repositório.

git commit -a -m "mensagem"
-a funciona para comitar arquivos que já foram modificados e já foram comitados ao menos uma vez.

git checkout --<file>
Caso queira retirar do índice.

git log
Lista os logs.

git log --stat
Mostra o que cada commit foi alterado.

git log --graph
Mostra os logs gráficamente.

gitk --all &
Git gráfico para visualização de logs.

git reset HEAD <>
Retira o arquivo modificado do índice, voltando para o Working Area.

git reset HEAD~1 --hard >
Esse comando retorna para o -1 commit;
--hard > Arranca fora o commit inteiro;
--soft > Ele volta para o Índice.

git commit -m "Teste" --amend
Para adicionar um arquivo no último commit;
Dica: Usar só locamente;
Joga fora o último commit e cria um novo.

.gitignore
Colocar as informações que não deseja versionar;
Ex: *.log >> Nunca versionará os arquivos com extensão .log.

git add target/teste.txt -f
Caso queira versionar mesmo estando configurando no .gitignore.

git reflog
Guarda o que foi-se apagando.

git merge <SHA1>
git merge <branch> > fazer merge com outro branch;
git merge <branch> --squash > Ele pega todos os commits de um branch e coloca no Índice no branch que está.

git clean -f
Pegar arquivos que estão no Working Area e jogam as modificações fora.

git stash
Pega os arquivos do índice e manda para o stash, retornando ao estado inicial do índice.
Usado para quando tem um ambiente estável e quer fazer novas modificações, por exemplo, testes.

git stash list
Mostra as listas que estão no Stash.

git stash apply
Ele pega o que está no stash e joga no índice novamente.

git stash apply stash@{0}
Retorna o último stash ou qualquer um que informou;
O mais recente sempre é o 0.

git stash clear
Apaga todas as listas do stash.

git stash save "<nome>"
Salva o stash com um nome.

git stash pop
Retira do stash, aplica no índice e apaga a lista do stash.

git stash drop <stash>
Retira da lista dos stashes.

  • Convenção

Convencione a não trabalhar-se em cima do Master
Pode-se criar branches. Quantas quiser. Foi feito para ter inúmeras.
Sempre usar.

git branch
Lista as branches.

git branch -a
Mostra todas as branches incluindo os remotos

git branch -d bugfix
Apaga o branch bugfix.

git checkout -b desenvolvimento
Cria um novo branch;
Para ficar indo de um branch para outro, é necessário commitar;
Pega o estado que encontra-se o branch e cria um novo da mesma forma.

git checkout <branch>
Mudando de branch.

git rebase <master>
Trazer o versionanmento do branch informado para o branch que encontra-se;
Tem a função de desfazer o último commit, faz o merge com o branch que informou e commita o commit que tinha desfeito;
A principal função é manter o histórico linear.

git rebase --continue
Para quando não encontra-se em nenhum branch, já retirou o conflito e está querendo commitar.

  • Repositórios Remotos

git clone <.gitRemoto> <repositorio>
Cria um clone do repositório informado para um novo diretório;
Cópia do repositório localmente;
Ex com Http: git clone https://github.com/marcoscarvalho/<path>.git <diretorio>

git remote
Lista os Repositórios remotos;

git remote show origin
Mostra o local da onde foi feito o clone;
"origin" é uma convenção para o primeiro remote/clone.

git remote add <nome> <url>
Adicionar novos repositórios remotos.

git remote rm <nomeRemote>
Desfaz a interligação com os outros repositórios.

git branch -b <novoBranch> origin/<velhoBranchDoQueVoceClonou>
Cria-se o branch a partir do branch clonado.

git push <remote> <branchRemoto>
Empurra para um branch remoto.

git pull <remote> <branchRemoto>
Puxa o repositório a partir do branch informado.

git fetch <remote> <branchRemoto>
Puxa novos commits do repo remoto para a branch especial <remote>/<branch>

git remote add <nome> <user>@<server>:<pasta>/<repositorio>
Adiciona um repositório externo

Enjoy
Marcos Carvalho

[HowTo] – [Git] Trabalhando com Repositório Central

  • Forma 1 - linear e parecida com a do SVN

git fetch ou git pull
Exp: git fetch origin/master;

git rebase ou git merge
Exp: git merge origin/master ou git rebase origin/master
git push

  • Forma 2 - Não desenvolver no master.
  • Criar novos branches.
  • git checkout no repositorio clonado.
  • Ex: git checkout -b bugfix

  • Depois que tiver terminado a correção do bug, sincronizar o master
  • No branch bugfix, dar rebase.
  • Ex: git rebase

  • no branch master, fazer merge para trazer as correções.
  • Ex: git merge bugfix

    git push origin master

  • Desfazer do branch.
  • Ex: git branch -d bugfix

    Enjoy
    Marcos Carvalho

    [HowTo] – [Git] Colaboração

    • Depois que tiver recebido uma invocação que alguém fez alguma melhoria, é necessário validar e aprovar.
    • Você verá novos repositórios clonados a partir do seu.
    • Baixar as melhorias, validar e disponibilizar novamente.

    git remote add <remote> <url>
    <remote> é interessante você salvar o nome do usuário.
    <url> read-only.

    • É recomendável criar um novo branch para validação e aprovação.

    git fetch <remote>
    Baixando as informações.

    git branch -a
    Mostrar todas as branches nos seus devidos lugares.

    git diff <forkRemoteRepositorio>/<branch>
    Para visualizar as diferenças do fork com o original, a partir da branch que se encontra.

    git merge <forkRemoteRepositorio>/<branch>
    Aceitando as alterações.
    Entre nos arquivos que deram conflitos para tirar as cláusulas que estão conflitantes. Salve.

    git commit
    Commit do merge a partir do fork.

    git push <remote> <branch>
    Empurre para o repositório original.

    Enjoy
    Marcos Carvalho

    [HowTo] – [Git] Colaboração com Tickets

    git format-patch master --stdout > <arquivo>.diff
    Novo arquivo com as diferenças.

    • Mandar esse arquivo para o dono;
    • O Dono criará um novo branch e a partir desse, validará se as modificações aperfeiçoam o projeto e aceitar o commit disponibilizando para a comunidade.

    git am <arquivo>.diff
    É aplicado o diff com o commit.
    Como se tivesse recebido o commit.

    git checkout <branch>
    Voltar para um branch. Ex: master;

    git merge <branchCriadoAcima>

    git push origin <branch>
    <branch> normalmente é o master

    Enjoy
    Marcos Carvalho

    [HowTo] – [Git] Tags

    • Demarcar momentos

    git tag <nome>
    Ex: git tag v1.0

    git push <remote> <nomeTag>
    Ex: git push origin v1.0

    Caso crie uma tag dentro de um branch e você delete esse branch, a tag não será apagada.

    git push <tag>
    Empurra a tag para o server.

    git push --tags
    manda as tags para o server.

    git checkout -b <branch> <TAG>
    Cria um branch a partir da tag.

    Enjoy
    Marcos Carvalho