-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hao Luo
committed
Feb 13, 2019
1 parent
47e4cdc
commit 699352c
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#Command: git filter-branch | ||
``` | ||
$ git filter-branch [--setup <command>] [--subdirectory-filter <directory>] [--env-filter <command>] | ||
[--tree-filter <command>] [--index-filter <command>] | ||
[--parent-filter <command>] [--msg-filter <command>] | ||
[--commit-filter <command>] [--tag-name-filter <command>] | ||
[--original <namespace>] | ||
[-d <directory>] [-f | --force] [--state-branch <branch>] | ||
[--] [<rev-list options>...] | ||
``` | ||
|
||
#Command: git archive | ||
``` | ||
$ git archive [<options>] <tree-ish> [<path>...] | ||
$ git archive --list | ||
$ git archive --remote <repo> [--exec <cmd>] [<options>] <tree-ish> [<path>...] | ||
$ git archive --remote <repo> [--exec <cmd>] --list | ||
--format <fmt> archive format | ||
--prefix <prefix> prepend prefix to each pathname in the archive | ||
-o, --output <file> write the archive to this file | ||
--worktree-attributes | ||
read .gitattributes in working directory | ||
-v, --verbose report archived files on stderr | ||
-0 store only | ||
-1 compress faster | ||
-9 compress better | ||
-l, --list list supported archive formats | ||
--remote <repo> retrieve the archive from remote repository <repo> | ||
--exec <command> path to the remote git-upload-archive command | ||
``` | ||
|
||
#Command: git reflog | ||
``` | ||
$ git reflog [ show | expire | delete | exists ] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#Git Global Config Settings | ||
``` | ||
[user] | ||
name = FirstName LastName | ||
email = [email] | ||
[color] | ||
ui = auto | ||
[gc] | ||
autoDetach = false | ||
[core] | ||
autocrlf = input | ||
editor = vim | ||
excludesfile = [path_to]/.gitignore_global | ||
[credential] | ||
helper = cache --timeout=10 | ||
[status] | ||
submoduleSummary = true | ||
[http] | ||
sslVerify = false | ||
``` | ||
|
||
#Advanced Commands: git remote | ||
``` | ||
# Replace an exist remote URL | ||
$ git remote set-url --add <name> <newurl> | ||
$ git remote set-url [--push] <name> <newurl> [<oldurl>] | ||
# Delete an exist remote URL | ||
$ git remote set-url --delete <name> url> | ||
# Rename an remote | ||
$ git remote rename <old> <new> | ||
$ git remote set-head <name> (-a | --auto | -d | --delete | <branch>) | ||
$ git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--mirror=<fetch|push>] <name> <url> | ||
$ git remote prune [-n | --dry-run] <name> | ||
$ git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...] | ||
$ git remote get-url [--push] [--all] <name> | ||
``` | ||
|
||
# |