git_remote_branch version 0.2.6
Usage:
grb create branch_name [origin_server]
grb publish branch_name [origin_server]
grb rename branch_name [origin_server]
grb delete branch_name [origin_server]
grb track branch_name [origin_server]
Notes:- If origin_server is not specified, the name 'origin' is assumed(git's default)- The rename functionality renames the current branch
The explain meta-command: you can also prepend any command with thekeyword 'explain'. Instead of executing the command, git_remote_branchwill simply output the list of commands you need to run to accomplishthat goal.
Example:grb explain creategrb explain create my_branch github
All commands also have aliases:create: create, newdelete: delete, destroy, kill, remove, rmpublish: publish, remotizerename: rename, rn, mv, movetrack: track, follow, grab, fetch
$ git remote -v show origin
...Remote branches:missing_branch new (next fetch will store in remotes/origin)$ git fetchFrom github.com:Foo/Bar* [new branch] missing_branch -> origin/missing_branch
gitCloneAllBranches() { # clone all git branches at once easily and cd in# clone as "bare repo"git clone --mirror $1# rename without .git extensionwith_extension=$(basename $1)without_extension=$(echo $with_extension | sed 's/.git//')mv $with_extension $without_extensioncd $without_extension# change from "bare repository" to notgit config --bool core.bare false# check if still bare repository if soif [[ $(git rev-parse --is-bare-repository) == false ]]; thenecho "ready to go"elseecho "WARNING: STILL BARE GIT REPOSITORY"fi# EXAMPLES:# gitCloneAllBranches https://github.com/something/something.git}