เริ่มต้นง่ายๆกับ GitHub
- by NAzT
มาเริ่มต้นกับ Github กันดีกว่า ..
เมื่อเราสมัคร github เรียบร้อยแล้ว ให้เข้าไปที่ dashboard แล้วก็ลอง create repository ดู กรอกข้อมูลให้ครบ 
เมื่อเรียบร้อยแล้วเราจะเจอ ..
Global setup:
Download and install Git git config --global user.name "Your Name" git config --global user.email youremail@yourdomain
Next steps:
mkdir naztgit2 cd naztgit2 git init touch README git add README git commit -m 'first commit'ให้ทำตามขั้นตอนข้างบนนี้มาเลย ซึ่งก็คือเราจะสร้างไฟล์ เพื่อที่จะอัพเข้า repository ของเรา
เมื่อเราสร้างไฟล์ขึ้นมาใหม่ (จากคำสั่ง touch) และ add เข้าไปใน git (คำสั่ง git add) แล้ว และก็ commit แล้ว (คำสั่ง git commit)
ต่อไปก็จะเป็นการอัพขึ้น github
ขั้นแรกต้อง add remote ก่อน ด้วยคำสั่ง
git remote add origin git@github.com:NAzT/naztgit2.gitข้างบนนี้ก็จะได้ remote ชื่อ origin แล้วก็อัพไปที่ repository ของเรา ซึ่งก็คือ git@github.com:NAzT/naztgit2.git
หลังจากนั้นก็ push เข้าไปใน github โดยใช้คำสั่งดังข้างล่างนี้
git push origin masterจะเห็นว่า origin คือชื่อ remote ส่วน master เป็น branch ถ้าเรามี branch อื่นเราก็ ใส่เป็นชื่อ branch อื่นที่ต้องการ อัพไปใน github ก็ได้
จะได้ประมาณนี้
กรณีที่เรามี repository อยู่แล้วก็ทำตาม
Existing Git Repo?
cd existing_git_repo git remote add origin git@github.com:NAzT/naztgit2.git git push origin master
Importing a SVN Repo?
Click here
When you’re done:
Continueก็ยังไม่ค่อยรู้อะไรเหมือนกัน ลองมั่วๆดูไปก่อน … เห็นว่าดี เดี๋ยวจะลืมเลยมา blog เอาไว้ซะหน่อย
Related Blogs
- » Git Rebase: why, and when, you'd use it. – weblog.masukomi.org
- Sonnd › <a href="http://www.mondaynote.com/2010/05/02/balkanizing …
- Democrats Push for National ID « Conservative Libertarian Outpost
- still don't have a title » Blog Archive » Github announces SVN support
- What is the difference between HREF and SRC links? « TagFocus.com
- Professional Pre Amp
- Gucci New Jackie – Gold / Bamboo Push Lock Closure Light Brown Bag
- MetsBlog.com – Pre-Game: Giants vs. Mets
- The Origin of the Term “NerdProm”: Ana Marie Cox, and Twitter …
- SVN, HG, GIT command control – Desktop applications, Linux system …
- The Origin of Mother's Day « LewRockwell.com Blog
- Trending: '+chop(hd, 20)+' (source: +i.href+fr+) | Best Way To Do
- Using Push Notification from Your Windows Phone Application …
- CSS SVG-Filters Elem.style & xlink:href=”url(#id)” #fail – CSS SVG …
- Sustiva Might Be Extremely High When You Are Lacking A Respectable …
- How To Get Help For Prescription Medicine When You Have COPD …
- tecosystems » The Future of Open Data Looks Like…Github?
- New Xtina! | PerezHilton.com
- Lil' Wayne Gets Sued In Prison AGAIN!! | PerezHilton.com
- i'm a lumberjaph » Blog Archive » Github explorer
เรื่องที่เกี่ยวข้อง
