{"id":15672901,"url":"https://github.com/codebytere/git-fns","last_synced_at":"2025-05-06T22:07:21.643Z","repository":{"id":153192426,"uuid":"221980493","full_name":"codebytere/git-fns","owner":"codebytere","description":"My personal collection of custom git functions.","archived":false,"fork":false,"pushed_at":"2022-02-22T09:12:02.000Z","size":2328,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T22:04:41.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","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/codebytere.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-15T18:23:10.000Z","updated_at":"2022-12-21T08:32:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"20966279-7920-475f-9086-c172d0585c0b","html_url":"https://github.com/codebytere/git-fns","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebytere%2Fgit-fns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebytere%2Fgit-fns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebytere%2Fgit-fns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebytere%2Fgit-fns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codebytere","download_url":"https://codeload.github.com/codebytere/git-fns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252776579,"owners_count":21802467,"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":[],"created_at":"2024-10-03T15:33:20.725Z","updated_at":"2025-05-06T22:07:21.625Z","avatar_url":"https://github.com/codebytere.png","language":"Shell","readme":"# Git Functions\n\nMy personal collection of custom git functions.\n\n## Usage\n\nIn order for you to effectively make use of this repository, you'll need to clone down\nits contents and ensure that they are in your `PATH`.\n\n**Nota Bene:** I keep this in my home directory, but you can put in anywhere\nso long as it's added to your `PATH` accordingly.\n\n```sh\n$ cd $HOME\n$ git clone https://github.com/codebytere/git-fns\n$ export PATH=$PATH:$HOME/git-fns/fns\n```\n\n## Functions\n\n### `git patch-out [-l|--location=\u003clocation\u003e] [-n|--name=\u003cname\u003e] [-a|--append]`\n\n* `-l|--location=\u003clocation\u003e` - The location on disk where the file will be created. Defaults to `$HOME/Desktop`.\n* `-n|--name=\u003cname\u003e` - The name of the file to create or append to. Defaults to `local_diff`.\n* `-a|--append` - Append to the file instead of overwriting it.\n\nAllow a user to quickly export a diff in patch format to a file at a chosen location.  Defaults to a file named `local_diff` created at `$HOME/Desktop`.\n\nExample:\n```sh\nelectron on git:master ❯ git patch-out -l=$HOME/Downloads --append\n```\n\n### `git tack [-f|--filepath=\u003cfilepath\u003e]`\n\n* `-f|--filepath=\u003cfilepath\u003e` - The path to the file to stage and add to the last commit.\n\nA quick way to add a forgotten change to the most recent commit in a branch without needing to create a new one for a trivial change. Automatically pushes to the current working branch.\n\nExample:\n```sh\nelectron on git:master ❯ git tack README.md\n```\n\n### `git refresh [-r|remote=\u003cremote\u003e] [-b|--branch=\u003cbranch\u003e]`\n\n* `-r|remote=\u003cremote\u003e` - The name of the git remote. Defaults to `origin`.\n* `-b|--branch=\u003cbranch\u003e` - The name of the remote branch to rebase against. Defaults to `master`.\n\nCleanly rebase a local working branch on a remote branch.\n\nExample:\n```sh\nelectron on git:master ❯ git refresh -r=codebytere -b=testing\n```\n\n### `git patch-apply [-u|--url=\u003curl\u003e]`\n\n* `-u|--url=\u003curl\u003e` - The url for the commit to apply to your current working branch.\n\nApply a patch from a remote commit url to your current working branch.\n\n\nExample:\n```sh\nelectron on git:master ❯ git patch-apply https://github.com/electron/electron/commit/d2a82dbd1d2bd3869f910dd563001b98b3cec736\n```\n\n### `git sync [-u|--upstream=\u003cupstream\u003e] [-o|--origin=\u003corigin\u003e]`\n\n* `-u|--upstream=\u003cupstream\u003e` - The name of the upstream git remote. Defaults to `upstream`.\n* `-o|--origin=\u003corigin\u003e` - The name of the origin git remote. Defaults to `origin`.\n\nFetch latest commits from an upstream branch and update your origin\nwith those commits.\n\nExample:\n```sh\nelectron on git:master ❯ git sync\n```\n\n## Manpages\n\nI've also included custom man pages for each of these new functions, which will need to be \nadded to your `MANPATH` in order to work properly.\n\nAssuming you have already cloned down the directory as directed above:\n\n```sh\n$ cd $HOME\n$ export MANPATH=$MANPATH:$HOME/git-fns/man\n```\n\nYou will then be able to run:\n\n```sh\n# Or any other custom function.\n$ man git-tack\n```\n\nto see:\n\n```sh\nman(1)                         git tack man page                        man(1)\n\nNAME\n       git tack - Add a forgotten change to the most recent commit in a\n       branch.\nSYNOPSIS\n       git tack [-f|--filepath=\u003cpath\u003e]\n\nDESCRIPTION\n       A quick way to add a forgotten change to the most recent  commit  in  a\n       branch without needing to create a new commit.  Automatically pushes to\n       the current branch.\n\nOPTIONS\n       [-f|--filepath=\u003cpath\u003e]\n              The path to the file to stage and add to the last commit.\n\nBUGS\n       No known bugs.\n\nAUTHOR\n       Shelley Vohr \u003cshelley.vohr@gmail.com\u003e\n\n1.0                              November 2019                          man(1)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebytere%2Fgit-fns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodebytere%2Fgit-fns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebytere%2Fgit-fns/lists"}