From af0b1a78ebf1332c3240b18efb5793da5d1c3523 Mon Sep 17 00:00:00 2001 From: Junior Lima Date: Fri, 27 Feb 2015 09:49:01 -0300 Subject: [PATCH 1/3] =?UTF-8?q?Instala=C3=A7=C3=A3o=20e=20configura=C3=A7?= =?UTF-8?q?=C3=A3o=20do=20git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.sublime-project | 17 +++ README.sublime-workspace | 198 ++++++++++++++++++++++++++++ instalacao e configuracao do git.md | 52 ++++++++ 3 files changed, 267 insertions(+) create mode 100644 README.sublime-project create mode 100644 README.sublime-workspace create mode 100644 instalacao e configuracao do git.md diff --git a/README.sublime-project b/README.sublime-project new file mode 100644 index 0000000..97af22d --- /dev/null +++ b/README.sublime-project @@ -0,0 +1,17 @@ +{ + "folders": + [ + { + "follow_symlinks": true, + "path": "." + }, + { + "follow_symlinks": true, + "path": "/home/juniorlima/oliberal" + }, + { + "follow_symlinks": true, + "path": "/home/juniorlima/avante" + } + ] +} diff --git a/README.sublime-workspace b/README.sublime-workspace new file mode 100644 index 0000000..7b2e4d1 --- /dev/null +++ b/README.sublime-workspace @@ -0,0 +1,198 @@ +{ + "auto_complete": + { + "selected_items": + [ + ] + }, + "buffers": + [ + { + "file": "instalacao e configuracao do git.md", + "settings": + { + "buffer_size": 3853, + "line_ending": "Unix", + "name": "Passos para instalação e configuração do Git no Li" + } + } + ], + "build_system": "", + "command_palette": + { + "height": 392.0, + "selected_items": + [ + ], + "width": 392.0 + }, + "console": + { + "height": 0.0, + "history": + [ + ] + }, + "distraction_free": + { + "menu_visible": true, + "show_minimap": false, + "show_open_files": false, + "show_tabs": false, + "side_bar_visible": false, + "status_bar_visible": false + }, + "expanded_folders": + [ + ], + "file_history": + [ + "/home/juniorlima/Documentos/Git .md" + ], + "find": + { + "height": 0.0 + }, + "find_in_files": + { + "height": 0.0, + "where_history": + [ + ] + }, + "find_state": + { + "case_sensitive": false, + "find_history": + [ + ], + "highlight": true, + "in_selection": false, + "preserve_case": false, + "regex": false, + "replace_history": + [ + ], + "reverse": false, + "show_context": true, + "use_buffer2": true, + "whole_word": false, + "wrap": true + }, + "groups": + [ + { + "selected": 0, + "sheets": + [ + { + "buffer": 0, + "file": "instalacao e configuracao do git.md", + "semi_transient": false, + "settings": + { + "buffer_size": 3853, + "regions": + { + }, + "selection": + [ + [ + 414, + 414 + ] + ], + "settings": + { + "auto_name": "Passos para instalação e configuração do Git no Li", + "syntax": "Packages/Markdown/Markdown.tmLanguage" + }, + "translation.x": 0.0, + "translation.y": 0.0, + "zoom_level": 1.0 + }, + "stack_index": 0, + "type": "text" + } + ] + } + ], + "incremental_find": + { + "height": 0.0 + }, + "input": + { + "height": 0.0 + }, + "layout": + { + "cells": + [ + [ + 0, + 0, + 1, + 1 + ] + ], + "cols": + [ + 0.0, + 1.0 + ], + "rows": + [ + 0.0, + 1.0 + ] + }, + "menu_visible": true, + "output.find_results": + { + "height": 0.0 + }, + "project": "README.sublime-project", + "replace": + { + "height": 0.0 + }, + "save_all_on_build": true, + "select_file": + { + "height": 0.0, + "selected_items": + [ + ], + "width": 0.0 + }, + "select_project": + { + "height": 0.0, + "selected_items": + [ + ], + "width": 0.0 + }, + "select_symbol": + { + "height": 0.0, + "selected_items": + [ + ], + "width": 0.0 + }, + "selected_group": 0, + "settings": + { + }, + "show_minimap": true, + "show_open_files": false, + "show_tabs": true, + "side_bar_visible": true, + "side_bar_width": 150.0, + "status_bar_visible": true, + "template_settings": + { + } +} diff --git a/instalacao e configuracao do git.md b/instalacao e configuracao do git.md new file mode 100644 index 0000000..35c76d1 --- /dev/null +++ b/instalacao e configuracao do git.md @@ -0,0 +1,52 @@ +# Passos para instalação e configuração do Git no Linux (Segundo o Estúdio Avante) + +* Primeiramente abra o terminal (ctrl+alt+T) e digite o comando 'sudo apt-get install git' (e caso você esteja utilizando o Fedora utilize 'yum install git') e insira a senha do seu computador; + +* Após isto, é hora de cadastrar usuário e senha executando os serguintes comando no terminal 'git config --global user.name "Seu nome"' e 'git config --global user.email "seuemail@example.com"'; + +* Para verificar se as informações anteriores foram inseridas corretamente, execute o comando 'git config -- list' ; + +* Obtendo uma chave Git: Digite o comando 'ls -al ~/.ssh' para verificar se existe alguma chave existente. Isso fará com que apareça uma lista de arquivos e caso não apareça nenhum arquivo do tipo; + +(id_dsa.pub +id_ecdsa.pub +id_ed25519.pub +id_rsa.pub) +sua chave não existe. Para gerá-la digite o comando 'ssh-keygen -t rsa -C "seuemail@example.com"'' e logo após entre com sua senha e confirme-a. Isso gerará uma chave que será inserida nas configurações de seu perfil no GitHub. Basta acessar no menu da esquerda o link SSH Keys clicar adicionar uma nova chave. Na caixa de texto Title, coloque o nome da máquina a qual você está realizando o processo de instalação do Git, na caixa de baixo, insira a chave (Copie do terminal ctrl+shift+C) e cole (ctrl+V) e por fim clique no botão add key. Um E-mail de verificação será enviado para sua conta de E-mail, basta clicar no link para autenticar sua chave; + +* Feito isso é hora de Obter Repositórios. Caso seja o seu primeiro projeto use o comando 'git init' que criará um novo repositório vazio, caso o seu projeto já exista no servidor, basta clonar o projeto no diretório de trabalho digite o comando git clone + (o link ssh ou http do repositório que deseja clonar)+ o nome do diretório do projeto. Por exemplo 'git clone git@github.com:repositorio.git teste' repare que a palavra "teste" é o nome do diretório; + +* Vamos deixar o terminal colorido para melhor visualização do ambiente de códigos? Digite o seguinte comando no terminal +'gedit ~/.bashrc'. Após digitar este comando, vá até o final do código que aparecer no documento detexto que abrirá automaticamente após a parte do código que está escrita (fi fi [lá no final do código]) dê dois Enters e cole os seguintes comandos: + +' # Colors and Git +color=$'\e[1;32m' +path_color=$'\e[1;33m' +git_color=$'\e[1;36m' +normal_color=$'\e[m' +export GIT_PS1_SHOWDIRTYSTATE=1 +export PS1='\[$color\]\u@\h \[$path_color\]\w$(__git_ps1 " \[$git_color\][%s]") \[$normal_color\]' ' + +* Salve o documento, saia do terminal e o execute novamente; + +//Introduzir analogia para explicar melhor o que são remotes// + +* Para o príximo passo, é necessário acessar sua conta do GitHub.com e criar um fork (cópia) do remote que você está trabalhando; + +* Hora de criar Remotes. Para criar remotes, basta executar o comando 'git remote add (nome do remote) + (link ssh do remote)'. +Existem dois tipos de remotes o remote principal (Upstream) e o remote que é uma cópia do principal(Origin). Necessariamente, deve-se adicionar estes dois respectivos remotes basta executar os comandos 'git remote add + (nome do remote[use o nome origin para criar o remote do seu fork]) + (o link ssh do seu remote fork)' por exemplo git@github.com:seunomenogithub/docs.git e 'git remote add + (nome do remote[use o nome upstream para criar o remote principal]) + (link ssh do seu remote principal)'; + +*Feito isso digite o comando 'git remote -v' para verificar se seus remotes foram criados corretamente. + +* Referências deste documento : + +(http://git-scm.com/book/pt-br/v1/Primeiros-passos-Configura%C3%A7%C3%A3o-Inicial-do-Git "Primeiros passos -Configuração Inicial do Git") + +(https://github.com/avanteweb/pontoubalab "Avante web/Ponto Ubalab") + +(https://github.com/settings/ssh) + +(http://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History) + +(http://answers.ros.org/question/87866/how-to-edit-the-bashrc-file/) + \ No newline at end of file From 9c8abf827d9bc90e684536722fb3c20711d9923e Mon Sep 17 00:00:00 2001 From: Junior Lima Date: Fri, 27 Feb 2015 10:35:37 -0300 Subject: [PATCH 2/3] =?UTF-8?q?Corre=C3=A7=C3=B5es=20ortogr=C3=A1ficas=20e?= =?UTF-8?q?m=20algumas=20palavras?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- instalacao e configuracao do git.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instalacao e configuracao do git.md b/instalacao e configuracao do git.md index 35c76d1..4f0642d 100644 --- a/instalacao e configuracao do git.md +++ b/instalacao e configuracao do git.md @@ -31,12 +31,12 @@ export PS1='\[$color\]\u@\h \[$path_color\]\w$(__git_ps1 " \[$git_color\][%s]") //Introduzir analogia para explicar melhor o que são remotes// -* Para o príximo passo, é necessário acessar sua conta do GitHub.com e criar um fork (cópia) do remote que você está trabalhando; +* Para o próximo passo, é necessário acessar sua conta do GitHub.com e criar um fork (cópia) do remote que você está trabalhando; * Hora de criar Remotes. Para criar remotes, basta executar o comando 'git remote add (nome do remote) + (link ssh do remote)'. Existem dois tipos de remotes o remote principal (Upstream) e o remote que é uma cópia do principal(Origin). Necessariamente, deve-se adicionar estes dois respectivos remotes basta executar os comandos 'git remote add + (nome do remote[use o nome origin para criar o remote do seu fork]) + (o link ssh do seu remote fork)' por exemplo git@github.com:seunomenogithub/docs.git e 'git remote add + (nome do remote[use o nome upstream para criar o remote principal]) + (link ssh do seu remote principal)'; -*Feito isso digite o comando 'git remote -v' para verificar se seus remotes foram criados corretamente. +* Feito isso digite o comando 'git remote -v' para verificar se seus remotes foram criados corretamente. * Referências deste documento : From da0ab191af2bf83c2cb43de9e3b362a3631f65ca Mon Sep 17 00:00:00 2001 From: Junior Lima Date: Fri, 27 Feb 2015 10:49:47 -0300 Subject: [PATCH 3/3] gitignore incluido --- .gitignore | 2 + README.sublime-project | 17 ---- README.sublime-workspace | 198 --------------------------------------- 3 files changed, 2 insertions(+), 215 deletions(-) create mode 100644 .gitignore delete mode 100644 README.sublime-project delete mode 100644 README.sublime-workspace diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0e379c5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.sublime-project +*.sublime-workspace diff --git a/README.sublime-project b/README.sublime-project deleted file mode 100644 index 97af22d..0000000 --- a/README.sublime-project +++ /dev/null @@ -1,17 +0,0 @@ -{ - "folders": - [ - { - "follow_symlinks": true, - "path": "." - }, - { - "follow_symlinks": true, - "path": "/home/juniorlima/oliberal" - }, - { - "follow_symlinks": true, - "path": "/home/juniorlima/avante" - } - ] -} diff --git a/README.sublime-workspace b/README.sublime-workspace deleted file mode 100644 index 7b2e4d1..0000000 --- a/README.sublime-workspace +++ /dev/null @@ -1,198 +0,0 @@ -{ - "auto_complete": - { - "selected_items": - [ - ] - }, - "buffers": - [ - { - "file": "instalacao e configuracao do git.md", - "settings": - { - "buffer_size": 3853, - "line_ending": "Unix", - "name": "Passos para instalação e configuração do Git no Li" - } - } - ], - "build_system": "", - "command_palette": - { - "height": 392.0, - "selected_items": - [ - ], - "width": 392.0 - }, - "console": - { - "height": 0.0, - "history": - [ - ] - }, - "distraction_free": - { - "menu_visible": true, - "show_minimap": false, - "show_open_files": false, - "show_tabs": false, - "side_bar_visible": false, - "status_bar_visible": false - }, - "expanded_folders": - [ - ], - "file_history": - [ - "/home/juniorlima/Documentos/Git .md" - ], - "find": - { - "height": 0.0 - }, - "find_in_files": - { - "height": 0.0, - "where_history": - [ - ] - }, - "find_state": - { - "case_sensitive": false, - "find_history": - [ - ], - "highlight": true, - "in_selection": false, - "preserve_case": false, - "regex": false, - "replace_history": - [ - ], - "reverse": false, - "show_context": true, - "use_buffer2": true, - "whole_word": false, - "wrap": true - }, - "groups": - [ - { - "selected": 0, - "sheets": - [ - { - "buffer": 0, - "file": "instalacao e configuracao do git.md", - "semi_transient": false, - "settings": - { - "buffer_size": 3853, - "regions": - { - }, - "selection": - [ - [ - 414, - 414 - ] - ], - "settings": - { - "auto_name": "Passos para instalação e configuração do Git no Li", - "syntax": "Packages/Markdown/Markdown.tmLanguage" - }, - "translation.x": 0.0, - "translation.y": 0.0, - "zoom_level": 1.0 - }, - "stack_index": 0, - "type": "text" - } - ] - } - ], - "incremental_find": - { - "height": 0.0 - }, - "input": - { - "height": 0.0 - }, - "layout": - { - "cells": - [ - [ - 0, - 0, - 1, - 1 - ] - ], - "cols": - [ - 0.0, - 1.0 - ], - "rows": - [ - 0.0, - 1.0 - ] - }, - "menu_visible": true, - "output.find_results": - { - "height": 0.0 - }, - "project": "README.sublime-project", - "replace": - { - "height": 0.0 - }, - "save_all_on_build": true, - "select_file": - { - "height": 0.0, - "selected_items": - [ - ], - "width": 0.0 - }, - "select_project": - { - "height": 0.0, - "selected_items": - [ - ], - "width": 0.0 - }, - "select_symbol": - { - "height": 0.0, - "selected_items": - [ - ], - "width": 0.0 - }, - "selected_group": 0, - "settings": - { - }, - "show_minimap": true, - "show_open_files": false, - "show_tabs": true, - "side_bar_visible": true, - "side_bar_width": 150.0, - "status_bar_visible": true, - "template_settings": - { - } -}