git Page History
Instalação Git no Ubuntu
sudo apt-get update
sudo apt-get install git
Copiando todo o código fonte para sua máquina
git clone http://softwarepublico.gov.br/gitlab/gsan/geosanweb.git
Para converter um branch para master
Suponha que você tenha feito um branch no código e depois deseje que ele se torne master, esquecendo todas as alterações do master. Para isso, supondo que o nome do seu branch seja new_master, execute:
git checkout new_master
git merge --strategy=ours --no-commit master
git commit -am 'changing branch "new_master" to "master"'
git checkout master
git merge new_master
Adicionar arquivos, realizar commit e enviar para repositório
git add --all -v
git commit -a -m "V.0.9.1 - Message about the commit"
git push origin master
Gerenciamento chaves
Para mais informações, selecione aqui
Fazer um fork para o seu repositório
git clone https://softwarepublico.gov.br/xxxxxx
git remote rm origin
git remote add origin https://github.com/xxxxxxx
git push -u origin master
Para ver qual o origem do seu repositório
git remote -v
Ignorar todas mudanças locais de forma permanente
git checkout
Referências
Last edited by José Maria Villac Pinheiro