Mudanças entre as edições de "Git"

De WikiLICC
Ir para: navegação, pesquisa
(Criou página com 'Pequeno lembrete de como usar git e github. Ver http://myprogrammingblog.com/2012/01/20/github-how-clone-github-repo-how-to-push-to-github-how-to-get-files-from-github-ubuntu...')
 
m (GitHub: How to clone GitHub repo? How to push to Github? How to get files from GitHub ?)
Linha 6: Linha 6:
  
 
Passos:  
 
Passos:  
1. How to set up and clone repo to your local machine avoiding message: Permission denied (publickey).
+
o How to set up and clone repo to your local machine avoiding message: Permission denied (publickey).
2. How to transfer all changes you are making INTO Github
+
o How to transfer all changes you are making INTO Github
3. How to get those changes FROM GitHub
+
o How to get those changes FROM GitHub
  
 
==How to setup up GitHub to your local machine ?==
 
==How to setup up GitHub to your local machine ?==

Edição das 22h37min de 23 de maio de 2015

Pequeno lembrete de como usar git e github.

Ver http://myprogrammingblog.com/2012/01/20/github-how-clone-github-repo-how-to-push-to-github-how-to-get-files-from-github-ubuntu/

GitHub: How to clone GitHub repo? How to push to Github? How to get files from GitHub ?

Passos: o How to set up and clone repo to your local machine avoiding message: Permission denied (publickey). o How to transfer all changes you are making INTO Github o How to get those changes FROM GitHub

How to setup up GitHub to your local machine ?

First download Git and set your SSH key.

How to clone your repo to your local machine ?

  • Find your repo address in your GitHub repo page;
  • Copy the address in the box (git@github.com.../...git)
  • In terminal
> cd /LocalRepos
> git clone ADDRESS_YOU_COPIED_FOR_SSH
> ls
> cd /Repo

How to transfer all changes you are making INTO Github ?

Existem 3 passos:

  • Adicione os arquivos:
> cd /Repo
/Repo> git add .    # . para todo o diretorio
  • Commint suas trocas:
> git commit  -m "Mensagem do que foi atualizado"
  • Push suas trocas para o servidor:
> git push

Verifique que as trocas estão no site github.

How to get those changes FROM GitHub ?

> git checkout
> git pull

Estes comandos trarão baixarão todas as novas atualizações do GitHub para sua máquina.