Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Thursday, October 27, 2011

meet git-p4

For some reasons, in recent works I have to use Perforce, the revision control system used by Perl core team before 2008. Unfortunately, perforce lacks of distributed features and leads to heavy branching. In this developing, these two problems often interrupted programmers with conflicts hardly to solve. Bad workflow design also makes members forget to check out before editing randomly. A git subcommand git-p4 lets you use the great tool git locally with the smooth integration to perforce server.

The steps to configure on kernel.org are currently unavailable. The official site of Perforce saved a copy. Following normal steps to write .p4config to setup p4client and install p4 and git-p4 into $PATH, $ git p4 clone //depos/path /local/path would just work. After local commit of git, $ git p4 rebase && git p4 submit works just like $ git pull --rebase && git push to remote git repository.

By the way, if you use Mercurial there is also a perforce extension can enable hg to clone perforce repository directly with a few of setup.

However, I strongly recommend perforce users migrating to modern distributed revision control system. After all, all the best companies and organizations have given Git / Mercurial a big hug, such as Github, BitBucket, Apple, Google Code, Perl, Rails, Gnome, Debian, Android and Linux Kernel. The git-p4 is a good transformer.

2012-04-26 update:
The git-p4 is now part of the git distribution and the version on github is no longer updated and doesn't work.

Saturday, August 15, 2009

Can't locate Git.pm in @INC

Well, the installation of Github::Import worked well on Linux boxs but always reported "can't locate Git.pm in @INC" on Macintosh boxs. It is just a little trick and the answer is here.

Git.pm comes with git instead of being a part of CPAN. Building a copy of git-core or copying from other box solve it quickly.

 

Saturday, January 3, 2009

GitHub Creator

Install
# cpan Git::Github::Creator

Setting in ~/.github_creator.ini
[github]
login_page="https://github.com/login"
account=joe@example.com
password=foobar
remote_name=origin
debug=1
Then, in local git repository
github_creator --name my-project --desc "an awesome thing"

Arguments are optional in a Perl module with META.yml.

GitHub Creator's repository and manual on cpan