{"id":23377811,"url":"https://github.com/udanielnogueira/git-tutorial","last_synced_at":"2026-02-14T17:32:06.291Z","repository":{"id":106328581,"uuid":"383609301","full_name":"udanielnogueira/git-tutorial","owner":"udanielnogueira","description":"Primeiros passos usando o Git.","archived":false,"fork":false,"pushed_at":"2024-11-20T20:23:20.000Z","size":19,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-12T18:45:46.115Z","etag":null,"topics":["git"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/udanielnogueira.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-07-06T22:11:07.000Z","updated_at":"2025-02-22T17:20:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"daf79b14-b15d-4a83-bed6-9013ae46550f","html_url":"https://github.com/udanielnogueira/git-tutorial","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/udanielnogueira/git-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udanielnogueira%2Fgit-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udanielnogueira%2Fgit-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udanielnogueira%2Fgit-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udanielnogueira%2Fgit-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/udanielnogueira","download_url":"https://codeload.github.com/udanielnogueira/git-tutorial/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udanielnogueira%2Fgit-tutorial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29450883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git"],"created_at":"2024-12-21T18:19:56.777Z","updated_at":"2026-02-14T17:32:06.277Z","avatar_url":"https://github.com/udanielnogueira.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Tutorial\n\nPrimeiros passos usando o Git.\n\n## Versão\n\n```powershell\ngit -v\n```\n\n## Configuração\n\n```powershell\ngit config --global user.email \"you@example.com\"\ngit config --global user.name \"your name\"\n```\n\n## Exemplo de jornada com repositório já criado no GitHub\n\n1. Entrar na pasta local do Github\n\n```powershell\ncd caminhoGitHub\n```\n\n2. Clonar repositório\n\n```powershell\ngit clone https://github.com/username/repositorio\n```\n\n3. Verificar status\n\n```powershell\ngit status\n```\n\n4. Preparar arquivo\n\n```powershell\ngit add .\n```\n\nou\n\n```powershell\ngit add file.extension\n```\n\n5. Fazer commit\n\n```powershell\ncommit -m \"Update file\"\n```\n\n6. Fazer push\n\n```powershell\ngit push\n```\n\n## Exemplo de jornada com repositório ainda não criado no GitHub\n\n1. Entrar na pasta local do GitHub\n\n```powershell\ncd caminhoGitHub\n```\n\n2. Criar pasta do repositório\n\n```powershell\nmkdir repositorio\n```\n\n3. Entrar na pasta do repositório\n\n```powershell\ncd nomeRepositorio\n```\n\n4. Configurar repositório\n\n```powershell\ngit init\n```\n\n5. Verificar status\n\n```powershell\ngit status\n```\n\n6. Criar README.md via prompt\n\n```powershell\necho \"# My README\" \u003e README.md\n```\n\n7. Verificar status\n\n```powershell\ngit status\n```\n\n8. Adicionar o arquivo ao Git\n\n```powershell\ngit add README.md\n```\n\n9. Verificar status\n\n```powershell\ngit status\n```\n\n10. Fazer commit\n\n```powershell\ngit commit -m \"Create file\"\n```\n\n11. Verificar log\n\n```powershell\ngit log\n```\n\n12. Verificar status\n\n```powershell\ngit status\n```\n\n13. Adicionar endereço remoto\n\n```powershell\ngit remote add origin https://github.com/username/repositorio.git\n```\n\n14. Criar repositório remoto vazio no GitHub\n\nUse o mesmo nome do repositório criado localmente.\n\n15. Fazer push\n\n```\ngit push -u origin main\n```\n\nEsse push mais completo é ideal para quando for feito pela primeira vez, após isso `git push` somente. E em caso de Fatal Error no HTTP, resete a url dessa forma:\n\n```powershell\ngit remote set-url origin https://github.com/udanielnogueira/PastaDoProjeto.git\n```\n\n## Próximos passos\n\nApós a sincronização com a nuvem, basta executar os comandos de adição, commit e push. E caso for criar um pull request, criar uma branch com seu nome antes.\n\n```powershell\ngit add .\n\ngit commit -m \"Update file\"\n\ngit push\n```\n\n## Outros comandos\n\nCriar nova branch\n\n```powershell\ngit branc novaBranch\n```\n\nMudar para outra branch\n\n```powershell\ngit checkout outraBranch\n```\n\nApagar mudanças e voltar ao estado anterior\n\n```powershell\ngit reset --hard\n```\n\nAcessar help de um comando\n\n```powershell\ngit comando --help\n\n# Exemplo\ngit merge --help\n```\n\nVer mudanças feitas em um commit específico\n\n```powershell\ngit show hashNumber\n```\n\nFazer merge de uma novaBranh com a branch main\n\n```powershell\ngit checkout main\ngit merge novaBranch\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fudanielnogueira%2Fgit-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fudanielnogueira%2Fgit-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fudanielnogueira%2Fgit-tutorial/lists"}