DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Git: Start A New Project

05.31.2009
| 5684 views |
  • submit to reddit
        Creating and Commiting
$ cd (project-directory)
$ git init
$ (add some files)
$ git add .
$ git commit -m 'Initial commit'
Reference: <a href="http://git-scm.com/">Git homepage</a>    

Comments

Snippets Manager replied on Fri, 2009/06/05 - 3:32am

if(!isBlank(ObjFrm.MCATXintCatId0,trimAll(ObjFrm.MCATXintCatId0.value),"Article Category")) return false; function trimAll(sString) { while (sString.substring(0,1) == ' ') { sString = sString.substring(1, sString.length); } while (sString.substring(sString.length-1, sString.length) == ' ') { sString = sString.substring(0,sString.length-1); } return sString; } function isBlank(obj,objval,msg) { if(objval == "") { //alert("- " + msg + " is required."); message = "- " + msg + " is required."; //message = "- " + msg; alert(message); if(obj.type != 'textarea') obj.focus(); return false; } else return true; } function isEmail(IsItReal,IsItRealval,name) { if (IsItRealval != "") { var valEmail = IsItRealval; var reg = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; if(reg.test(valEmail)) return true; else { //alert('- Invalid '+name+'.') message = "- Invalid "+name+"."; //message = "- "+name; alert(message); IsItReal.focus(); return false; } } else { //alert('- '+name+' is required.') message = '- '+name+' is required.'; alert(message); IsItReal.focus(); return false; } }