Skip to content

Instantly share code, notes, and snippets.

@cmcculloh
Created January 9, 2012 22:15
Show Gist options
  • Save cmcculloh/1585261 to your computer and use it in GitHub Desktop.
Save cmcculloh/1585261 to your computer and use it in GitHub Desktop.
weird new script behaviour
master
$ new menu
####################################################################################
Creating new branch: `menu`
####################################################################################
This tells your local git about all changes on the remote. Then we'll check your git status.
------------------------------------------------------------------------------------
$ git fetch --all --prune
Fetching origin
x [deleted] (none) -> origin/anything
Fetching upstream
$ git status
# On branch master
nothing to commit (working directory clean)
------------------------------------------------------------------------------------
(1) - Create branch `menu` from `master`
2 - Create branch `menu` from the current branch `master`
3 - Stash Changes and create branch `menu` from `master`
4 - Revert all changes to tracked files \(ignores untracked files\), and create branch `menu` from `master`
5 - Abort creation of branch `menu` from `master`
Type the number of the choice you want and hit enter:
You chose: 1
Continuing...
This branches master to create a new branch named menu
and then checks out the menu branch. We will make sure
to get all updates (if available) to master as well.
------------------------------------------------------------------------------------
Remote: ------------------------------------------------------------------------------------
0: origin
1: upstream
------------------------------------------------------------------------------------
Choose a remote (or just hit enter to abort):
origin
$ git pull ------------------------------------------------------------------------------------
0: origin
1: upstream
------------------------------------------------------------------------------------
Choose a remote (or just hit enter to abort):
origin master
error: unknown option `----------------------------------------------------------------------------------'
usage: git fetch [<options>] [<repository> [<refspec>...]]
or: git fetch [<options>] <group>
or: git fetch --multiple [<options>] [(<repository> | <group>)...]
or: git fetch --all [<options>]
-v, --verbose be more verbose
-q, --quiet be more quiet
--all fetch from all remotes
-a, --append append to .git/FETCH_HEAD instead of overwriting
--upload-pack <path> path to upload pack on remote end
-f, --force force overwrite of local branch
-m, --multiple fetch from multiple remotes
-t, --tags fetch all tags and associated objects
-n do not fetch all tags (--no-tags)
-p, --prune prune remote-tracking branches no longer on remote
--recurse-submodules[=<on-demand>]
control recursive fetching of submodules
--dry-run dry run
-k, --keep keep downloaded pack
-u, --update-head-ok allow updating of HEAD ref
--progress force progress reporting
--depth <depth> deepen history of shallow clone
$ git checkout -b menu
Switched to a new branch 'menu'
------------------------------------------------------------------------------------
usage: git config [options]
Config file location
--global use global config file
--system use system config file
--local use repository config file
-f, --file <file> use given config file
Action
--get get value: name [value-regex]
--get-all get all values: key [value-regex]
--get-regexp get values for regexp: name-regex [value-regex]
--replace-all replace all matching variables: name value [value_regex]
--add adds a new variable: name value
--unset removes a variable: name [value-regex]
--unset-all removes all matches: name [value-regex]
--rename-section rename section: old-name new-name
--remove-section remove a section: name
-l, --list list all
-e, --edit opens an editor
--get-color <slot> find the color configured: [default]
--get-colorbool <slot>
find the color setting: [stdout-is-tty]
Type
--bool value is "true" or "false"
--int value is decimal number
--bool-or-int value is --bool or --int
--path value is a path (file or directory name)
Other
-z, --null terminate values with NUL byte
Finally, your new branch will be pushed up to the remote: ----------------------------------------------------------------------------
0: origin
1: upstream
------------------------------------------------------------------------------------
Choose a remote (or just hit enter to abort):
origin
------------------------------------------------------------------------------------
$ git push ------------------------------------------------------------------------------------
0: origin
1: upstream
------------------------------------------------------------------------------------
Choose a remote (or just hit enter to abort):
origin menu
error: unknown option `----------------------------------------------------------------------------------'
usage: git push [<options>] [<repository> [<refspec>...]]
-v, --verbose be more verbose
-q, --quiet be more quiet
--repo <repository> repository
--all push all refs
--mirror mirror all refs
--delete delete refs
--tags push tags (can't be used with --all or --mirror)
-n, --dry-run dry run
--porcelain machine-readable output
-f, --force force updates
--recurse-submodules[=<check>]
controls recursive pushing of submodules
--thin use thin pack
--receive-pack <receive-pack>
receive pack program
--exec <receive-pack>
receive pack program
-u, --set-upstream set upstream for git pull/status
--progress force progress reporting
------------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment