{"id":23699771,"url":"https://github.com/techmmunity/git-magic","last_synced_at":"2025-09-03T03:30:43.090Z","repository":{"id":46293577,"uuid":"405217983","full_name":"techmmunity/git-magic","owner":"techmmunity","description":"Github Magic Config","archived":false,"fork":false,"pushed_at":"2023-12-19T13:25:29.000Z","size":32,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-04T06:22:41.243Z","etag":null,"topics":["git","gitconfig"],"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/techmmunity.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2021-09-10T21:33:33.000Z","updated_at":"2024-06-06T15:57:22.000Z","dependencies_parsed_at":"2022-09-14T21:01:17.626Z","dependency_job_id":null,"html_url":"https://github.com/techmmunity/git-magic","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/techmmunity/git-magic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techmmunity%2Fgit-magic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techmmunity%2Fgit-magic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techmmunity%2Fgit-magic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techmmunity%2Fgit-magic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techmmunity","download_url":"https://codeload.github.com/techmmunity/git-magic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techmmunity%2Fgit-magic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273384758,"owners_count":25095959,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","gitconfig"],"created_at":"2024-12-30T08:15:43.288Z","updated_at":"2025-09-03T03:30:42.825Z","avatar_url":"https://github.com/techmmunity.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌟 Magic Git Config 🌟\n\n## 📚 See the docs\n\n- [English](./docs/en/README.md)\n- [Português](./docs/pt-br/README.md)\n\n## ♻️ See about Gitflow\n\n- [English](./docs/en/gitflow.md)\n- [Português](./docs/pt-br/gitflow.md)\n\n## 🤗 Contributing\n\nFork this project and add more commands, help the community!\n\nSee how to contribute to this project at the docs 😉\n\n## 📝 Things to be changed\n\n| Variable            | Quantity | Value                          |\n| ------------------- | :------: | ------------------------------ |\n| `[YOUR_NAME_HERE]`  |    2     | Your name (Ex: Henrique Leite) |\n| `[YOUR_EMAIL_HERE]` |    2     | Your email address             |\n\n## 📄 File Content\n\n```sh\n# Version: 1.4.1\n\n[user]\n\tname = [YOUR_NAME_HERE]\n\temail = [YOUR_EMAIL_HERE]\n\n[init]\n\tdefaultBranch = master\n\n[pull]\n\tdefault = current\n\n[push]\n\tdefault = current\n\n[core]\n\teol = lf # Defines eol using Linux format\n\tautocrlf = input\n\n[alias]\n\t# Clean\n\tgone = \"!f() { git fetch -p \u0026\u0026 git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -D; } ; f\" # https://medium.com/darek1024/how-to-clean-local-git-branches-that-were-removed-on-the-remote-4d76f7de93ac\n\tcln = prune -v --progress # Remove Branches That No Longer Exists In Repository\n\tignore = \"!f() { git rm --cached `git ls-files -i -c --exclude-from=.gitignore`; } ; f\" # Removes Files That Are In .gitignore From The Repository\n\t# Clone\n\tcn = clone # Clone Project\n\tcnsb = \"!f() { git clone -b $* $*; } ; f\" # Clone specific branch from project\n\t# Fork\n\tupdfork = git fetch upstream # Update your fork\n\t# Remote\n\trls = remote -v # Return a List of All Branches In Repository\n\trrem = \"!f() { git remote remove origin; } ; f\" # Remove Origin Repository\n\tradd = \"!f() { git remote add origin $*; } ; f\" # Add a Repository as Origin\n\tratt = \"!f() { git remote remove origin \u0026\u0026 git remote add origin $*; } ; f\" # Updates the Origin Repository\n\tups = \"!f() { git branch --set-upstream-to=origin/$1 $1; } ; f\" # Set Branches Upstream\n\t# Master Branch\n\tpum = pull origin master # Pull From Master\n\tpom = push origin master -u # Push to Master\n\t# Add\n\ta = add . # Stage All Changes\n\t# Pull\n\tpl = pull # Get Project From Repository\n\t# Push\n\tps = \"!f() { git push -f; } ; f\" # Push Changes to Repository\n\tpsn = \"!f() { git push -f --no-verify; } ; f\" # Push Changes to Repository\n\tpsu = \"!f() { git push --set-upstream; } ; f\" # Create a Link Between Local Branch And Repository Branch\n\tacips = \"!f() { git a \u0026\u0026 git ci $* \u0026\u0026 git ps; } ; f\" # Stage Changes, Create Commit And Push To Repository\n\tacaps = \"!f() { git a \u0026\u0026 git ca $* \u0026\u0026 git ps; } ; f\" # Stage Changes, Amend Commit And Push To Repository\n\tacipsn = \"!f() { git a \u0026\u0026 git commit -m \\\"$*\\\" --no-verify \u0026\u0026 git push -f --no-verify; } ; f\" # git acips With --no-verify\n\tacapsn = \"!f() { git a \u0026\u0026 git commit --amend -m \\\"$*\\\" --no-verify \u0026\u0026 git push -f --no-verify;  } ; f\" # Stage Changes, Amend Commit And Push To Repository\n\t# Commit\n\tci = \"!f() { git commit -m \\\"$*\\\"; } ; f\" # Stage Changes and Create Commit\n\tca = \"!f() { git commit --amend -m \\\"$*\\\"; } ; f\" # Stage Changes and Amend Commit\n\tauthor = \"!f() { git commit --amend --author=\\\"[YOUR_NAME_HERE] \u003c[YOUR_EMAIL_HERE]\u003e\\\"; } ; f\" # Change Commit Author\n\t# Branch\n\tb = branch # List All Local Branches\n\tbd = \"!f() { git branch -D $*; } ; f\" # Delete Local Branch\n\tbn = \"!f() { git branch -m $*; } ; f\" # Change Branch Name\n\t# Checkout\n\tckm = \"!f() { git checkout master \u0026\u0026 git pull origin master; } ; f\" # Change To master Branch And Git Pull\n\tckd = \"!f() { git checkout dev \u0026\u0026 git pull origin dev; } ; f\" # Change To dev Branch And Git Pull\n\tckp = \"!f() { git checkout $* \u0026\u0026 git pull; } ; f\" # Change Branch And Git Pull\n\tck = \"!f() { git checkout $*; } ; f\" # Change Branch\n\tcb = \"!f() { git checkout -b $*; } ; f\" # Create New Branch\n\t# Rebase\n\trbd = \"rebase dev\" # Rebase Actual Branch With dev Branch\n\trbm = \"rebase master\" # Rebase Actual Branch With master Branch\n\trbh = \"!f() { git rebase -i HEAD~$*; } ; f\" # Rebase commits (Merge multiple commits in one)\n\trbc = \"!f() { git a \u0026\u0026 git rebase --continue; } ; f\" # Incase of conflict, you will have to fix it, and then, use this command to continue\n\trmm = \"!f() { git rebase -i origin/master~$* master; } ; f\" # Merge all the commits of master branch\n\t# Stash\n\tsts = stash\n\tsta = stash apply\n\tstd = stash drop\n\tstl = stash list\n\tstc = stash clear\n\t# Merge\n\tmg = merge --no-ff\n\tcat = checkout --theirs . # Resolve all conflicts accepting INCOMING changes\n\tcao = checkout --ours . # Resolve all conflicts accepting CURRENT changes\n\t# Log\n\tst = status # List Changes\n\tsu = \"!f() { git status --short | grep --color -E '^(AA|UU)'; } ; f\"\n\tss = \"!f() { git status --short | grep --color -E '^(M |A |C )'; } ; f\"\n\tsf = show --name-only\n\tlg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen\u003c%an\u003e%Creset %s' --max-count=7 # Show the 7 latest commits minified\n\tincoming = !(git fetch --quiet \u0026\u0026 git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u})\n\toutgoing = !(git fetch --quiet \u0026\u0026 git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..)\n\t# Undo\n\tunstage = reset HEAD --\n\tundo = checkout . # Undo Changes\n\trollback = reset --soft HEAD~1 # Undo last commit\n\t# Transfer\n\ttsf = \"!f() { git show $1:$2 \u003e $2 } ; f\" # Move changes from a file to another\n```\n\n## Warnings\n\n- The `git ignore` doesn't works on Windows\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechmmunity%2Fgit-magic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechmmunity%2Fgit-magic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechmmunity%2Fgit-magic/lists"}