msgbartop
用铅笔写日记,记录那最原始的美丽
msgbarbottom

初识git

最近看到git这个年轻的SCM(版本控制系统)逐渐流行起来了,很多知名的开源项目都纷纷转移到它的怀抱里,如我们熟知的著名linux桌面环境gnome,还有我最爱的播放器vlc等

而且网上对git的好评也是如潮水一般呀。那么,作为喜好尝鲜的我,情绪自然不会稳定了。

总想去尝试一下,看看究竟如何的好?

由于googecode不支持git,而以git著名的github,我也没有帐号.所以只能在sourceforge上小试牛刀了

以sf为例,首先进入项目页面,找到admin菜单下的feature manage下面,启用git(SourceCode Version Control),就是在它前面打个钩。其实这个时候git repository 就已经初始化好了.

这个时候,如果不想再用其他的SCM的话,把它们前面的钩去掉就可以了(前提是你已经check out了)。

接下来,就是进入members菜单,点击用户名,勾选 "Allow access to Git repository (developer access)"选项,授一下权。

ps:以上操作需要project administrator 身份.

现在,就是导入版本库了。

git 要求用户本地也要有一个版本库,然后再push到远程服务器。这一点让我很不习惯,因为我一般都是直接commit到远程repo的.

因为我在windows 平台,所以还得安装git 的win 版 --msysgit.如果IDE是visual studio 的话,可以直接下载 Git Extensions 的完整版安装,里面包含了MSysGit 和 KDiff3.

之后,进入 git bash,其实就是个MinGW环境.
现在开始初始化本地git repo.

mkdir temp cd temp git init (初始化空版本库 temp) git config user.name "temp NAME" (设置名字) git config user.email "[email protected]" (设置邮箱)

#(添加远程repo 地址.sf 是以 ssh 开头,默认repo 名字是项目unix名,可以改)
git remote add sf ssh://[email protected]/gitroot/TEMP-PRO/TEMP-PRO
git config branch.master.remote sf
git config branch.master.merge refs/heads/master

至此,本地git库建立完毕,并映射好了远程git 库.且merge以本地为主.
当然,这一切均可以通过git extension的菜单完成.

接下来,创建一个hello.c文件,push到远程repo上.

vim hello.c git add hello.c git add . git commit -a -m "this is hello.c" git push sf master #(需要输入密码,如果报 fatal: The remote end hung up unexpectedly 错,可能是ssh地址输入错误. #也有可能是没有生成对应ssh的公钥和私钥到服务器导致的.)

到这步,我已经成功向远程版本库提交了源码.

不过我很快就发现了git的一个毛病,就是无法删除以前提交的文件.
这个真是个问题,万一程序员不小心提交了一下一些私密文件(如密码、艳照之类),哪岂不是糟了!!?
尽管可以 git rm hello.c ,不过在仓库里只是标识了 "deleted",还是可以打开.
谷歌一下,终于找到了一个方案,见 git: forever remove files or folders from history,提供了个shell 脚本.
保存为 del.sh,运行 del.sh hello.c ,嘿还真删除了.
不过 push 的时候,出错了!提示

! [rejected] master -> master (non-fast forward)
error: failed to push some refs to '/path/to/'

说需要先从服务器上pull 一下,oh ,my god...囧rz

好在我有shell权限,直接登录,定位到 /home/scm_git/t/tm/temp-pro/temp-pro,直接删除.草~

最后,给个链接《Git 中文教程》,我还是继续SVN吧.

SourceForge.net 2009社区奖项开始投票啦

[caption id="" align="alignnone" width="205" caption="活动logo"]sf vote logo[/caption]

一年一度的sf.net 社区大奖已经拉开了帷幕,这也是开设这项活动的第四个年头了。

经过了将近一个月的网络提名,从今天(也就是6月24号)开始正式票选最佳项目等奖项了

本次票选将在7月20号截止,而最终的票选结果将会在23号公布.

下面是此次活动的时间表

  • May 6 - 提名开始
  • May 29 - 提名结束
  • June 22 - 候选名单公布,投票开始
  • July 20 - 投票关闭
  • July 23 - 公布获胜者 at OSCON

之前的06,07,08年度获得殊荣的开源项目,像7-zip(这次好像没有进入提名~~)、notepad++、audacity、openoffice等现在依然影响我们的生活.这就是开源软件的魅力,呵呵

本次社区大奖较去年新增了几个奖项,分别是:

Best Commercial Open Source Project (最佳商业开源项目)NEW

Best Project for Academia(最佳项目『学院』) NEW

Best Project for Government(最佳项目『政府』) NEW

Most Likely to Change the Way You Do Everything(最能改变你做事情的方法) NEW

Best Visual Design(最佳设计) NEW

我已经投上了我宝贵的一票,你们呢?? 8-)

SourceForge.net Update: 2009-04-30 Edition

Oh!  We also plan to kick off our2009 Community Choice Awardsprogram next
week.  In the meantime, start thinking about the projects you want to
nominate!

== March Project of the Month: dotProject ==

dotProject is a Project Management tool written in PHP that aims to be a
best-of-breed project management system. Rather than a generic container
approach like a CMS or groupware app, we decided that we would do a generic
project management tool. We are not industry (or use specific), it's not a
project planning tool - it is designed to serve as an information gathering
and progress reporting tool.

Read more: http://sourceforge.net/community/potm-200904/

== Statistics and Top Projects ==

Daily SourceForge.net Stats for 29-Apr-2009:

11,132,493 pages served
2,128,422 files downloaded (25.1 TB)
104 new projects approved

Top 25 Projects on 30-Apr-2009:

1. Openbravo ERP
http://sourceforge.net/projects/openbravo
Openbravo ERP is a Web based ERP for SME, built on proven MVC & MDD
framework that facilitate its customization. | IMPORTANT NOTICE. Openbravo
ERP project has been migrated to a new home
http://forge.openbravo.com/projects/openbravoerp

2. ZK - Simply Ajax and Mobile
http://sourceforge.net/projects/zk1
ZK is Ajax Java framework without JavaScript. With direct RIA, 200+ Ajax
components and markup languages, developing Ajax/RIA as simple as desktop
apps and HTML/XUL pages. Support JSF/JSP/JavaEE/Hibernate/.., and Ajax
script in Java/Ruby/Groovy/Python/..

3. ADempiere ERP Business Suite
http://sourceforge.net/projects/adempiere
ADempiere Business Suite ERP/CRM/MFG/SCM/POS done the Bazaar way in an open
and unabated fashion. Focus is on the Community that includes Subject
Matter Specialists, Implementors and End-Users. We are a community fork of
Compiere.

4. Zenoss Core - Enterprise IT Monitoring
http://sourceforge.net/projects/zenoss
Zenoss Core is an enterprise network and systems management application
written in Python/Zope. Zenoss provides an integrated product for
monitoring availability, performance, events and configuration across
layers and across platforms.

5. Notepad++
http://sourceforge.net/projects/notepad-plus
Notepad++, a source code editor and MS Windows Notepad replacement, has the
mission to offer a greener environment. By optimizing its routines, it
results in reducing CPU power consumption then reducing the world carbon
dioxide emissions.

6. phpMyAdmin
http://sourceforge.net/projects/phpmyadmin
phpMyAdmin is a tool written in PHP intended to handle the administration
of MySQL over the Web. Currently it can create and drop databases,
create/drop/alter tables, delete/edit/add fields, execute any SQL
statement, manage keys on fields.

7. OrangeHRM - Human Resource Management
http://sourceforge.net/projects/orangehrm
OrangeHRM is an Open Source Human Resource Management System that covers
Personnel Information Management, Employee Self Service, Leave, Time &
Attendance, Benefits, and Recruitment. Tags: HRM, HRMS, HCM, HRIS, EHRMS,
Human Capital Management

8. Audacity
http://sourceforge.net/projects/audacity
A fast multi-track audio editor and recorder for Linux, BSD, Mac OS, and
Windows.  Supports WAV, AIFF, Ogg, and MP3 formats.  Features include
envelope editing, mixing, built-in effects and plug-ins, all with unlimited
undo.

9. PostBooks ERP, accounting, CRM by xTuple
http://sourceforge.net/projects/postbooks
Free open source ERP, accounting, CRM package for small to midsized
businesses. ERP client runs on Linux, Mac, and Windows (built with open
source Qt framework). Business logic resides in PostgreSQL database.
International ERP, accounting, and CRM tools.

10. ScummVM
http://sourceforge.net/projects/scummvm
ScummVM is a cross-platform interpreter for several point-and-click
adventure engines. This includes all SCUMM-based adventures by LucasArts,
Simon the Sorcerer 1&2 by AdventureSoft, Beneath a Steel Sky and Broken
Sword 1&2 by Revolution, and many more.

11. Mumble
http://sourceforge.net/projects/mumble
Low-latency
, high-quality voice communication for gamers. Includes game
linking, so voice from other players comes from the direction of their
characters, and has echo cancellation so the sound from your loudspeakers
won't be audible to other players.

12. SW Test Automation Framework
http://sourceforge.net/projects/staf
The Software Testing Automation Framework (STAF) is a framework designed to
improve the level of reuse and automation in test cases and test
environments. The goal of STAF is to provide a complete end-to-end
automation solution for testers.

13. Sweet Home 3D
http://sourceforge.net/projects/sweethome3d
Sweet Home 3D is an interior design Java application for quickly choosing
and placing furniture on a house 2D plan drawn by the end-user, with a 3D
preview.

14. KeePass Password Safe
http://sourceforge.net/projects/keepass
KeePass Password Safe is a free, open source, light-weight and easy-to-use
password manager for Windows. You can store your passwords in a
highly-encrypted database, which is locked with one master password or key
file.

15. ffdshow tryouts
http://sourceforge.net/projects/ffdshow-tryout
ffdshow is a DirectShow filter and VFW codec for many audio and video
formats, such as DivX, Xvid and H.264. Over 70 bugs have been fixed, codecs
have been updated, and support for a few new formats has been added in the
tryouts. Vista is now supported.

16. webERP web-based ERP  Accounting
http://sourceforge.net/projects/web-erp
Integrated accounting ERP system. Multi-language/currency/

inventory
locations. Full double entry. SO/AR/PO/AP/GL/Bank/Sales Analysis.
BOMs/assemblies/kit-sets. Flexible pricing. Emailable pdf reports. Fast PHP
created html for any browser.

17. Scintilla
http://sourceforge.net/projects/scintilla
Scintilla is a free source code editing component which includes useful
features such as syntax styling, error indicators, folding, code completion
and call tips. The project includes SciTE (SCIntilla based Text Editor).

18. xVideoServiceThief
http://sourceforge.net/projects/xviservicethief
xVideoServiceThief is a tool for downloading your favourite video clips
from a lot of video websites. xVideoServiceThief also provide you the
ability to convert each video in most popular formats: AVI, MPEG1, MPEG2,
WMV, MP4, 3GP, MP3 file formats.

19. DeSmuME
http://sourceforge.net/projects/desmume
DeSmuME is a Nintendo DS emulator.

20. net-snmp
http://sourceforge.net/projects/net-snmp
net-snmp
provides tools and libraries relating to the Simple Network
Management Protocol including: An extensible agent, An SNMP library,tools
to request or set information from SNMP agents, tools togenerate and handle
SNMP traps, etc.

21. MediaInfo
http://sourceforge.net/projects/mediainfo
Get technical information and tags of a lot of multimedia files. Supported
formats : - Video : AVI/OGM/MKV/MPG/VOB/MP4/3GP/... - Audio :
MP3/OGG/MKA/MP4/AAC/...

22. PhpGedView
http://sourceforge.net/projects/phpgedview
PhpGedView is a revolutionary genealogy program which allows you to view
and edit your genealogy on your website. It has full privacy functions, can
import from GEDCOM files, and supports multimedia. It also simplifies
family collaboration.

23. XBMC Media Center
http://sourceforge.net/projects/xbmc
XBMC Media Center is a free cross-platform media player and entertainment
hub software for Linux, Mac, Windows, as well as the Xbox game-console.
XBMC is capable of playing back all popular video, audio, and picture
formats out-of-the-box.

24. Fink
http://sourceforge.net/projects/fink
Fink is an attempt to bring the full world of Unix OpenSource software to
Darwin and Mac OS X. Packages are downloaded and built automatically and
installed into a tree managed by dpkg, all with full dependency tracking.

25. aTunes
http://sourceforge.net/projects/atunes
aTunes is a powerful, full-featured, cross-platform player and manager,
with audio cd rip frontend. Currently supported formats are mp3, ogg, wav,
wma, flac, mp4, ape, mpc, mac, radio streaming and podcasts.

SourceForge.net Update: 2009-03-31 Edition

SF三月份monthly newsletter 来了

NOTAPAD++ 荣登榜首.

== Statistics and Top Projects ==

Daily SourceForge.net Stats for 30-Mar-2009:

9,288,349 pages served
2,658,463 files downloaded
117 new projects approved

Top 25 Projects on 30-Mar-2009:

1. Notepad++
http://sourceforge.net/projects/notepad-plus
Notepad++ is a generic source code editor (it tries to be anyway) and
Notepad replacement written in c++ with win32 API. The aim of Notepad++ is
to offer a slim and efficient binary with a totally customizable GUI.

2. Openbravo ERP
http://sourceforge.net/projects/openbravo
Openbravo ERP is a Web based ERP for SME, built on proven MVC & MDD
framework that facilitate its customization. | IMPORTANT NOTICE. Openbravo
ERP project has been migrated to a new home
http://forge.openbravo.com/projects/openbravoerp

3. ADempiere ERP Business Suite
http://sourceforge.net/projects/adempiere
ADempiere Business Suite ERP/CRM/MFG/SCM/POS done the Bazaar way in an open
and unabated fashion. Focus is on the Community that includes Subject
Matter Specialists, Implementors and End-Users. We are a community fork of
Compiere.

4. ZK - Simply Ajax and Mobile
http://sourceforge.net/projects/zk1
ZK is Ajax Java framework without JavaScript. With direct RIA, 200+ Ajax
components and markup languages, developing Ajax/RIA as simple as desktop
apps and HTML/XUL pages. Support JSF/JSP/JavaEE/Hibernate/.., and Ajax
script in Java/Ruby/Groovy/Python/..

5. Zenoss Core - Enterprise IT Monitoring
http://sourceforge.net/projects/zenoss
Zenoss Core is an enterprise network and systems management application
written in Python/Zope. Zenoss provides an integrated product for
monitoring availability, performance, events and configuration across
layers and across platforms.

6. MediaInfo
http://sourceforge.net/projects/mediainfo
Get technical information and tags of a lot of multimedia files. Supported
formats : - Video : AVI/OGM/MKV/MPG/VOB/MP4/3GP/... - Audio :
MP3/OGG/MKA/MP4/AAC/...

7. PostBooks ERP, accounting, CRM by xTuple
http://sourceforge.net/projects/postbooks
Free open source ERP, accounting, CRM package for small to midsized
businesses. ERP client runs on Linux, Mac, and Windows (built with open
source Qt framework). Business logic resides in PostgreSQL database.
International ERP, accounting, and CRM tools.

8. Mumble
http://sourceforge.net/projects/mumble
Low-latency, high-quality voice communication for gamers. Includes game
linking, so voice from other players comes from the direction of their
characters, and has echo cancellation so the sound from your loudspeakers
won't be audible to other players.

9. phpMyAdmin
http://sourceforge.net/projects/phpmyadmin
phpMyAdmin is a tool written in PHP intended to handle the administration
of MySQL over the Web. Currently it can create and drop databases,
create/drop/alter tables, delete/edit/add fields, execute any SQL
statement, manage keys on fields.

10. ffdshow tryouts
http://sourceforge.net/projects/ffdshow-tryout
ffdshow is a DirectShow filter and VFW codec for many audio and video
formats, such as DivX, Xvid and H.264. Over 70 bugs have been fixed, codecs
have been updated, and support for a few new formats has been added in the
tryouts. Vista is now supported.

11. webERP web-based ERP Accounting
http://sourceforge.net/projects/web-erp
Integrated accounting ERP system. Multi-language/currency/inventory
locations. Full double entry. SO/AR/PO/AP/GL/Bank/Sales Analysis.
BOMs/assemblies/kit-sets. Flexible pricing. Emailable pdf reports. Fast PHP
created html for any browser.

12. OrangeHRM - Human Resource Management
http://sourceforge.net/projects/orangehrm
OrangeHRM is an Open Source Human Resource Management System that covers
Personnel Information Management, Employee Self Service, Leave, Time &
Attendance, Benefits, and Recruitment. Tags: HRM, HRMS, HCM, HRIS, EHRMS,
Human Capital Management

13. Stellarium
http://sourceforge.net/projects/stellarium
Stellarium renders 3D photo-realistic skies in real time with OpenGL. It
displays stars, constellations, planets, nebulas and others things like
ground, landscape, atmosphere, etc.

14. KeePass Password Safe
http://sourceforge.net/projects/keepass
KeePass Password Safe is a free, open source, light-weight and easy-to-use
password manager for Windows. You can store your passwords in a
highly-encrypted database, which is locked with one master password or key
file.

15. Azureus
http://sourceforge.net/projects/azureus
Azureus: Vuze is a powerful, full-featured, cross-platform bittorrent
client and open content platform.

16. Sweet Home 3D
http://sourceforge.net/projects/sweethome3d
Sweet Home 3D is an interior design Java application for quickly choosing
and placing furniture on a house 2D plan drawn by the end-user, with a
final 3D preview.

17. WinMerge
http://sourceforge.net/projects/winmerge
WinMerge is a Windows tool for visual difference display and merging, for
both files and directories. Unicode support. Flexible syntax coloring
editor. Windows Shell integration. Regexp filtering. Side-by-side line diff
and highlights diffs inside lines.

18. ScummVM
http://sourceforge.net/projects/scummvm
ScummVM is a cross-platform interpreter for several point-and-click
adventure engines. This includes all SCUMM-based adventures by LucasArts,
Simon the Sorcerer 1&2 by AdventureSoft, Beneath a Steel Sky and Broken
Sword 1&2 by Revolution, and many more.

19. Fink
http://sourceforge.net/projects/fink
Fink is an attempt to bring the full world of Unix OpenSource software to
Darwin and Mac OS X. Packages are downloaded and built automatically and
installed into a tree managed by dpkg, all with full dependency tracking.

20. TCPDF - PHP class for PDF
http://sourceforge.net/projects/tcpdf
TCPDF is a PHP class for generating PDF documents without requiring
external extensions. TCPDF Supports UTF-8, Unicode, RTL languages and HTML.

21. PortableApps.com: Portable Software/USB
http://sourceforge.net/projects/portableapps
PortableApps.com allows you to carry your favorite computer programs and
all of your bookmarks, settings, email and more with you on a portable
device (USB flash drive, iPod, portable hard drive, CD, etc) and use them
on any Windows computer.

22. JMRI Model Railroad Interface
http://sourceforge.net/projects/jmri
Java interfaces and sample implementations for controlling a model railroad
layout from a personal computer.JMRI is intended as a jumping-off point for
hobbyists to build their own layout controls. Includes the DecoderPro and
PanelPro applications.

23. FreeMind
http://sourceforge.net/projects/freemind
A mind mapper, and at the same time an easy-to-operate hierarchical editor
with strong emphasis on folding. These two are not really two different
things, just two different descriptions of a single application. Often used
for knowledge and content mgmt.

24. Gallery
http://sourceforge.net/projects/gallery
A slick, intuitive web based photo gallery. Gallery is easy to install,
configure and use. Gallery photo management includes automatic thumbnails,
resizing, rotation, and more. Authenticated users and privileged albums
make this great for communities.

25. Audacity
http://sourceforge.net/projects/audacity
A fast multi-track audio editor and recorder for Linux, BSD, Mac OS, and
Windows.Supports WAV, AIFF, Ogg, and MP3 formats.Features include envelope
editing, mixing, built-in effects and plug-ins, all with unlimited undo.

sf项目主页全攻略

很多在 Sourceforge.net 上做项目的朋友,大多会忽视的一个服务----就是SF免费提供的 项目主页的功能。

其实,有一个类似于 xxx.sourcefoge.net  的主页,对自己项目的宣传也不是一件坏事呀,哈哈。而且SF提供的Virtual Host 功能非常优质,几乎支持所有语言,如  PHP (via mod_php), Perl, Python, Tcl, Ruby, and shell scripts.

不支持的很少,是

  • SSL (encryption)
  • SF.net User Authentication
  • JSP (programming language) support
  • Microsoft Front Page and Extensions
  • Dreamweaver Remote Admin support
  • 并且还提供 mysql 数据库支持,还可以用自己的域名去访问,只需要做一下A ,Cname记录:

    Using the tools provided by your DNS provider, configure the following:

    • yourdomain.com should be a IN A to 216.34.181.97.
    • www.yourdomain.com should be a CNAME to vhost.sourceforge.net.
    • cvs.yourdomain.com should be a CNAME to PROJECTNAME.cvs.sourceforge.net.

    把自己在本地做好的网页文件上传到空间里面,有两种途径。

    1.通过sftp----比较简易,功能较少

    就拿putty 套件里面的PSFTP.EXE 来说,打开后 ,输入 "open 用户名,项目名@web.sourceforge.net"   回车。再输入密码就可以了

    如图:

     

    2.就是通过shell.sourceforge.net 访问.

    Project shell server: shell.sourceforge.net

    PROJECTNAME.cvs.sourceforge.net

    PROJECTNAME.svn.sourceforge.net

    这个要用到SSH,首先得生成一个SSH Key ,我们可以用putty 套件里面的 PUTTYGEN.EXE, 运行后 在parameter 里选择 "SSH2 DSA". 然后点击 "Generate" 按钮,你所要做的事是:把鼠标指针在 上方空白处 晃动,以便随机生成KEY,完了后在Key comment 处 填上 "用户名@shell.sourceforge.net" ,最后 点击 "Save private key" 保存为 *.ppk 文件. 

    注:"Key passphrase " 和 "Confirm passphrase" 可以不填。

    如图:

    现在你要做的是:把 上方  "Public key for pasting into OpenSSH authorized_keys2 file" 框里面的所有字符复制下来。

    然后,登录你的sf帐号,切换到 "Account Options",  在 “Host Access Information ” 处点击 [Edit SSH Keys for Shell/CVS], 把 复制的字符粘贴进去。点击 update 即可。

    注:如果是两个KEY或者多个的话,要确保KEY与KEY之间有且只有一个回车,KEY中间不能有空格.

    如图:

    如果没有错误的话,应该会即时显示出 SSH key 的数量。如图

    SSH KEY 生效大概只要几分钟就可以了,很快的

    好了后就要去激活 SSH shell. 我们要用到PUTTY 套件里面的 PAGEANT.EXE 和 PUTTY.EXE.

    首先,运行PAGEANT.EXE ,在任务栏找到它,双击,点击 "Add Key ",浏览到先前保存的 *.ppk ,确定即可。

    如图:

    然后,运行 putty.exe , 注意:在此后的操作都建立在 Key Agent 基础上,所以 PAGEANT.EXE  不能关闭.

    设置putty,见下面的表格

    Session Host Name: "shell.sourceforge.net"
    Session Connection Type: "SSH"
    Connection > SSH > TTY uncheck "Don't allocate a pseudo-terminal"
    Connection > SSH Remote command: "create"
    Connection > Data Auto-login username: "用户名,项目名"

    如图:

    在 链接之前,先要确保该用户拥有访问此项目shell的权限,这个可以在项目里面的"Projece Admin"   里面的"Membership"看到。如图

    然后,点击 open 即可 登录激活 shell.

    成功 如图:

    之后,就可以用WINSCP登录shell,进入我们熟悉的图形界面了

    登录成功后,就可以像管理FTP一样管理项目网站的文件了

     

    -END -