COMPLETIONīash completion support is automatically enabled for all git built-in commandsĪnd also for aliases defined in the user ~/.gitconfig file. $ git config -global color.sh.dirty 'red' $ git config -global color.sh.workdir 'blue bold' Value to auto: $ git config -global color.sh autoĬustomize prompt colors by setting the color.sh.branch, color.sh.workdir,Īnd color.sh.dirty git config values: $ git config -global color.sh.branch 'yellow reverse' To enable git-sh's prompt colors explicitly, set the color.sh config The git-sh prompt includes ANSI colors when the git color.ui option is set andĮnabled. Work tree includes modified files that have not yet been staged, a dirty status Path to the current working directory from the root of the work tree. The default prompt shows the current branch, a bang ( !), and then the relative you might then have the following shell session: master!something> echo "stuff" >somefile a git add b git branch c git checkout d git diff f git fetch -prune k git cherry-pick l git log -pretty=oneline -abbrev-commit n git commit -verbose -amend r git remote s git commit -dry-run -short t git diff -cached The Staging Area a git add aa git add -update (mnemonic: "add all") stage git add ap git add -patch p git diff -cached (mnemonic: "patch") ps git diff -cached -stat (mnemonic: "patch stat") unstage git reset HEAD Commits and Commit History ci git commit -verbose ca git commit -verbose -all amend git commit -verbose -amend n git commit -verbose -amend k git cherry-pick re git rebase -interactive pop git reset -soft HEAD^ peek git log -p -max-count=1 Fetching and Pulling f git fetch pm git pull (mnemonic: "pull merge") pr git pull -rebase (mnemonic: "pull rebase") Miscellaneous Commands d git diff ds git diff -stat (mnemonic: "diff stat") hard git reset -hard soft git reset -soft scrap git checkout HEAD CUSTOM ALIASESĪnything defined in the section of the repository, user, or system gitĬonfig files are also available as top-level shell commands. The builtin aliases are overridden by aliases defined in the user or system Git-sh loads a set of standard aliases in addition to all core git commands. Top-level command aliases are created for all core git(1) subcommands, git-shīuiltin aliases (see BUILTIN ALIASES), and git command aliases defined in Typical usage is to change into the directory of a git work tree orīare repository and run the git-sh command to start an interactive shell If you don't want to update system-wide, the following will set it local to the repo before the fetch: git clone -c core.Git-sh starts an interactive bash(1) session modified for git-heavy To work with these in Windows, set a configuration flag: git config -system core.longpaths true (I piped the output of that command to a text file, then ran git rm -cached -ignore-unmatch against all entries in that file.) Update 3Ĭross-platform projects may have long paths from Mac/Unix systems. git ls-files -exclude-standard -ignored -directory Once the gitignore is fixed, the following will give you a list of files that would have been ignored. You've committed a project but gitignore wasn't set. git config -global core.editor "'C:\Program Files (x86)\Microsoft VS Code\code.exe' -w" Might as well change the text editor for command-line operations as well. This will change the dark red (which is unreadable on a black background) to a lighter shade. Posted here for convenience: git config -global "red bold" Git Command Line color settings 30 June 2016 by Paul Schaeflein
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |