wiki:PadrePluginGit

Version 15 (modified by bowtie, 2 years ago) (diff)

--

<-plug-ins

Padre::Plugin::Git

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.04 in trunk

Padre 0.97+

Padre::Plugin::Git v0.03

Padre 0.96

NB Bold shows current release of Padre ( Green Current )


History

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.

assumptions

  • 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

Usage

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

local

  • Staging
    • Stage File
    • Stage All
    • Unstage File ( reset HEAD file )
  • Commit
    • Commit File
    • Commit Project
    • Commit amend
    • Commit All ( stages and commits all -> git commit -a)
  • 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

Origin

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

Upstream

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

GitHub

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

NB. Context menu -> Commit All


Scenarios

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 external to Padre-Plugin-Git

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

nb http://www.wired.com/wiredenterprise/2012/05/torvalds_github/


Bugs

Please open a ticket here to register any issues.


Limitations

This provides Basic git cmd interface and a bit more.

if you want more

  • git cola
  • gitg

ToDo

  • basic local
  • basic remote
  • GitHub
    • pull request


__END__

<-plug-ins

Attachments (1)

Download all attachments as: .zip