{"id":26779849,"url":"https://github.com/vczb/git-playground","last_synced_at":"2026-04-09T11:40:16.131Z","repository":{"id":48844065,"uuid":"323681379","full_name":"vczb/git-playground","owner":"vczb","description":"Repositório para testes de issues, prs e tudo mais que o git e o github oferecem","archived":false,"fork":false,"pushed_at":"2022-03-30T02:17:28.000Z","size":299,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-27T15:56:00.612Z","etag":null,"topics":["git","github","hacktoberfest","open-source","pt-br"],"latest_commit_sha":null,"homepage":"https://vczb.github.io/git-playground","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vczb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-22T16:43:16.000Z","updated_at":"2023-03-07T14:56:42.000Z","dependencies_parsed_at":"2022-09-04T19:20:32.720Z","dependency_job_id":null,"html_url":"https://github.com/vczb/git-playground","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vczb%2Fgit-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vczb%2Fgit-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vczb%2Fgit-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vczb%2Fgit-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vczb","download_url":"https://codeload.github.com/vczb/git-playground/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246145556,"owners_count":20730581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","github","hacktoberfest","open-source","pt-br"],"created_at":"2025-03-29T06:20:37.669Z","updated_at":"2025-12-30T23:19:04.185Z","avatar_url":"https://github.com/vczb.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Git Playground\n\n\nEnvie sua PR com qualquer coisa, crie issues faça o que quiser fazer\n\n:octocat: \n\n### Configurando o git:\n\n_adiciona nome e email_\n\n```\ngit config --global user.name \"FIRST_NAME LAST_NAME\"\ngit config --global user.email \"email@example.com\"\n```\n\n_adiciona VS Code como editor padrão_\n\n```\ngit config --global core.editor 'code --wait'\n```\n\n### Comandos úteis:\n\n\n#### git log\n\n_log em uma linha e a branch associada_\n\n```\ngit log --oneline --decorate\n```\n\n_mostra árvore_\n\n```\ngit log --graph --oneline --decorate\n```\n\n_sem merge commits_\n\n```\ngit log --no-merges --oneline\n```\n\n_apenas merge commits_\n\n```\ngit log --no-merges --oneline\n```\n\n#### git revert\n\n_cria um commit que desfaz as alterações do commit selecionado_\n\n```\ngit revert HASH\n```\n\n#### git push\n\n_deleta uma branch remota_\n\n```\ngit push origin :nome-da-branch\n```\n\n#### git fetch\n\n_faz sincronização com todos as remotes_\n\n```\ngit fetch --all\n```\n\n_faz sincronização com com a remote upstream_\n\n```\ngit fetch upstream\n```\n\n#### git reset\n\n_reseta tudo com o último commit salvo na sua branch local_\n\n```\ngit reset --hard HEAD\n```\n\n_reseta tudo com o último commit salvo na origin upstream branch main_\n\n```\ngit reset --hard upstream/main\n```\n\n_desfaz os commits sem perder as alterações_\n\n```\ngit reset HASH\n```\n\n_desfaz o último commit sem perder as alterações e os arquivos continuam adicionados na área stage_\n\n```\ngit reset --soft HEAD~1\n```\n#### git rebase\n\n_realinha seu histórico de commit colocando os commits locais por cima dos da origin upstream branch main_\n\n```\ngit rebase upstream/main\n```\n\n_realinha seu histórico de commit colocando o commit de hash 5176a1057 por cima dos demais_\n\n```\ngit rebase 5176a1057\n```\n\n_faz rebase interativo permitindo mover, mesclar, remover e entre outras ações aos commits_\n\n```\ngit rebase -i HEAD~10\n```\n\n```\n# Commands:\n# p, pick \u003ccommit\u003e = use commit\n# r, reword \u003ccommit\u003e = use commit, but edit the commit message\n# e, edit \u003ccommit\u003e = use commit, but stop for amending\n# s, squash \u003ccommit\u003e = use commit, but meld into previous commit\n# f, fixup \u003ccommit\u003e = like \"squash\", but discard this commit's log message\n# x, exec \u003ccommand\u003e = run command (the rest of the line) using shell\n# d, drop \u003ccommit\u003e = remove commit\n# l, label \u003clabel\u003e = label current HEAD with a name\n# t, reset \u003clabel\u003e = reset HEAD to a label\n# m, merge [-C \u003ccommit\u003e | -c \u003ccommit\u003e] \u003clabel\u003e [# \u003coneline\u003e]\n# .       create a merge commit using the original merge commit's\n# .       message (or the oneline, if no original merge commit was\n# .       specified). Use -c \u003ccommit\u003e to reword the commit message.\n#\n# These lines can be re-ordered; they are executed from top to bottom.\n```\n\n\n#### git amend\n\n_mescla todas as alterações no último commit da sua branch local_\n\n```\ngit commit --amend --no-edit\n```\n\n_altera o nome do commit_\n\n```\ngit commit --amend -m 'Minha nova mensagem de commit'\n```\n\n#### git reflog\n\n_monitora as referências atualizadas no repositório local_\n\n```\ngit reflog\n```\n\n_reflog completo de todas as referências_\n\n```\n git reflog show --all \n```\n\n#### git remote\n\n_lista todos os repositórios remotos_\n\n```\n git remote -v\n```\n\n_adiciona uma url de um repositório git chamada origin_\n\n```\n git remote add origin git@github.com:vczb/git-playground.git\n```\n\n_remove a origin_\n\n```\n git remote remove origin\n```\n\n#### git branch\n\n_lista todas as branchs locais_\n\n```\n git branch -v\n```\n\n#### git checkout \n\n_reseta o arquivo orange conforme o mesmo arquivo na branch origin/main_\n\n```\ngit checkout origin/main -- orange.md\n```\n\n_muda para uma branch existente_\n\n```\ngit checkout nome_da_branch\n```\n\n_cria uma nova branch e usa ela_\n\n```\ngit checkout -b nome_da_branch\n```\n\n#### git show\n\n_mostra as alterações_\n\n```\ngit show\n```\n\n_mostra os arquivos alterados_\n\n```\ngit show --name-only\n```\n\n#### git mv\n\n_move um arquivo e preserva o histórico git dele_\n\n```\ngit mv arquivo destino\n```\n\n#### git blame\n\n_Exibe metadados do autor anexados a linhas de commit específicas em um arquivo_\n\n```\ngit blame README.md\n```\n\n#### git stash\n\n_Guarda as alterações na branch sem precisar dar commit_\n\n```\ngit stash\n```\n\n_Lista as alterações guardadas_\n\n```\ngit stash list\n```\n\n_Recupera a última alteração guardada_\n\n```\ngit stash pop\n```\n\n_Recupera a alteração guardada de índice \"2\"_\n\n```\ngit stash apply 2\n```\n\n---\n## Artigos:\n\n- [Convenção de commits](https://www.conventionalcommits.org/pt-br/v1.0.0-beta.4/)\n- [A Git Workflow Using Rebase](https://medium.com/singlestone/a-git-workflow-using-rebase-1b1210de83e5)\n- [Manter repositório do Github forkado sincronizado com o original](https://blog.da2k.com.br/2014/01/19/manter-repositorio-github-forkado-sincronizado-com-o-original/)\n- [Guia: Como contribuir em Open Source](https://willianjusten.com.br/guia-como-contribuir-em-open-source/)\n- [Mesclagem vs. Rebase](https://www.atlassian.com/br/git/tutorials/merging-vs-rebasing)\n- [Github Flow](https://guides.github.com/introduction/flow/index.html)\n\n## Vídeos:\n\n- [Git e Github para iniciantes](https://www.youtube.com/playlist?list=PLlAbYrWSYTiPA2iEiQ2PF_A9j__C4hi0A)\n- [Como usar Git e Github na prática: Guia para iniciantes](https://www.youtube.com/watch?v=2alg7MQ6_sI)\n\n## Interessante:\n\n- [git-flow](https://github.com/petervanderdoes/gitflow-avh)\n- [bash-git-prompt](https://github.com/magicmonty/bash-git-prompt)\n\n## Docs:\n\n- [Git](https://git-scm.com/doc)\n- [Github](https://docs.github.com/pt)\n- [Bitbucket](https://www.atlassian.com/git/tutorials)\n- [Emojis](https://gist.github.com/rxaviers/7360908)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvczb%2Fgit-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvczb%2Fgit-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvczb%2Fgit-playground/lists"}