Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 1.4 KB

README.md

File metadata and controls

38 lines (31 loc) · 1.4 KB

##README

There's no "git info" command, so i decide to write one for myself, a Git newbie.

Written in Free Pascal via Lazarus IDE v1.2.4.

Windows only currently.

###Setup

  1. Copy git-info.exe into \libexec\git-core. We can use "git info" to execute this command from now on.
  2. After run "git info", git-info.ini will be generated in git-core folder, youn can modify git-info.ini to statisfy your own needs.
  3. gitinfo.exe will generated a git-prompt.bat in your Windows temporary folder, you can change the DOS-box prompt by executing git-prompt.bat. You can change the folder of git-prompt.bat in git-info.ini.

###Usage

    git info
    git info && git-prompt.bat
    git info -?

###git-info.ini sample:

[Command]
  ;; You can add up to 99 cmd pairs, from cmd1.xxx to cmd99.xxx
  cmd1.title=====Remote URL:
  cmd1.exec=git remote -v
  cmd2.title=====All branches:
  cmd2.exec=git branch -a
  cmd3.title=====Recent commits:
  cmd3.exec=git log --pretty=format:"%C(yellow)%h %C(cyan)%ai %C(bold green)[%cn]%C(bold red)%d %C(bold green)%s%C(reset)" -10  --abbrev-commit --abbrev=4 
  cmd4.title=====Status:
  cmd4.exec=git status

###Version info

  • v0.01 2014/09/01 Initial version
  • v0.02 2014/09/02 Move prompt processing to a new command: git prompt
  • v0.03 2014/09/04 read .git/HEAD by git rev-parse command to get it properly