Version 37 (modified by bowtie, 3 years ago) (diff)




To Enable Padre::Plugin::Git in Padre, go to Tools->Plug-in Manager, select Git in left area.

Please note version compatibility, it's important, you can check what version is installed for Git use Plug-in Manager for Padre look in Help -> About -> Information

Padre::Plugin::Git v0.08

Padre 0.97+

Padre::Plugin::Git v0.03

Padre 0.96

NB Bold shows current release of Padre ( Green Current )


Git image Author Scott Chacon Licence


after banging my head on git, and being kicked by several to get over it, I decide that the best solution was to update the Git plugin on my little journey of enlightenment.

so after reading the early chapters of ProGit the following came to be.


  • local
    • git repro that is local to your editor, ie. same machine!
  • origin
    • repro on external server
    • repro in your GitHub
  • upstream
    • the repro your origin is forked from
  • File assume current in editor.
  • Directory within project
  • Project -> project_dir


  • Tools -> Git ( only visible if current file is in a .git repository )


  • Staging
    • Stage File
    • Stage All
    • Unstage File ( reset HEAD file )
    • Stage Patch ( git add -p file )
  • Commit
    • Commit File
    • Commit Project
    • Commit amend
    • Commit All ( stages and commits all -> git commit -a)
    • Commit Patch ( git commit -p file )
  • Checkout
    • Checkout File
  • Status
    • File Status
    • Directory Status
    • Project Status
  • Diff
    • Diff of File
    • Diff of Staged File
    • Diff of Directory
    • Diff of Project
  • Log ( need better names )
    • log --stat -2
    • log -p -2
    • log pretty
  • Blame
    • Blame, Current file ( for dod+ )


  • Origin
    • Show Origin Info.
    • Push to Origin
    • Fetch from Origin
    • Pull from Origin


  • Upstream
    • Show Upstream Info.
    • Fetch Upstream
    • Merge Upstream Master


  • Branching
    • Branch Info
    • Fetch All Branches from Origin


  • GitHub Pull Request
    • see GitHUb Access below, with out it, it won't work.

NB. Context menu -> Commit All


Scenario 1

So you have just forked a GitHub repo and cloned to your local machine, made a change to a file.

  • local Stage File
  • local Commit File
  • Push to Origin
  • GitHub Pull Request

four clicks that's all

Scenario 2

Your GitHub fork is out of sync with the master origin.

  • Fetch Upstream
  • Merge Upstream Master
  • Push to Origin

Tip use the Show * Info before and after to check if you want to.

GitHUb Access

To be able to use the github push request, we will need a username and token being stored in environment variables (in .bash_profile or wherever) external to Padre-Plugin-Git

  • my $user = $ENV{GITHUB_USER};
    • all we need is the username bit.
  • my $token = $ENV{GITHUB_TOKEN};



  • Auto write git commits to project Changes file

This use CPAN::Changes to write git commits to project Change file, This abuses the {{$NEXT}} token as a valid version, ( this is what it looks for {{$NEXT}} token in your Changes file )

see CPAN::Changes::Spec for format

suggest you make a copy first

 - bump version to 0.01_06 [3a67ed7]
 - we don't die any more if client can't connect to a server, as we are a
   gui [7eaee9c]

0.01_06 2012-11-03
 - Update Changes to CPAN::Changes::Spec [abb591e]
 - Update Changes to CPAN::Changes::Spec [bde5532]
 - randomly select a status responses to correspond to wiki page [30bb6fa]


Please open a ticket here to register any issues.


This provides Simple / Basic git cmd interface and a bit more.

An example of this is the Stage / Commit -p(--patch) option which just fires up a terminal, for the interactivity

if you want more, should look at the following, per say, or check the Git page.

  • git gui
  • git cola
  • gitg


  • basic local
  • basic remote
  • GitHub pull request
  • await critiques :)
  • release to CPAN



Attachments (1)

Download all attachments as: .zip