🔥 Git เป็น Version Control ที่ใช้จัดเก็บและควบคุมการเปลี่ยนแปลงที่เกิดขึ้นกับไฟล์ชนิดต่างๆ เช่น Text file, Source Code เป็นต้น
.
✍️ ซึ่งมันจะใช้เก็บบันทึกการเปลี่ยนแปลงของ Source Code เวอร์ชันล่าสุดที่เครื่องของเรา (Local Repository) สามารถทำงานได้โดยที่ไม่ต้องใช้เน็ต หากต้องการอัปเดต หรือเปลี่ยนแปลงก็สามารถทำการ Push ขึ้นไปเก็บที่ Remote Repository ได้นั่นเอง!
.
🔎 มันมีคำสั่งอะไร แล้วแต่ละอย่างใช้ทำอะไรบ้างไปดูกันเลยจ้า
.
⭐ 1) Git clone - ใช้ดาวน์โหลด/คัดลอกโปรเจกต์จาก Remote Repository ไว้ในเครื่องของเรา
.
คำสั่ง
git clone
⭐ 2) Git branch - สร้าง ลบ และเรียกดู Branch ได้ตามต้องการ
.
คำสั่งสร้าง Branch ใหม่
git branch
.
คำสั่งลบ Branch
git branch -d
⭐ 3) Git checkout - ใช้เปลี่ยน Branch ในการทำงาน
.
คำสั่ง
git checkout
.
หรือสามารถสร้าง Branch ใหม่และเรียกใช้ทันที ด้วยคำสั่ง
git checkout -b
⭐ 4) Git status - ใช้เช็คสถานะของไฟล์ต่างๆ ในโปรเจกต์ของเรา เช่น
.
คำสั่ง
git status
.
⭐ 5) Git add - ใช้สำหรับอัปเดตเวอร์ชันใหม่ของ Code ที่ถูกแก้ไขหรือสร้างใหม่ขึ้นบน Stage
.
คำสั่ง (ระบุชื่อไฟล์ที่ต้องการ)
git add
.
คำสั่ง (ไฟล์ทั้งหมดในโฟลเดอร์)
git add -A
.
⭐ 6) Git commit - ใช้สำหรับยืนยันการเปลี่ยนแปลงของไฟล์ที่ถูก Add ขึ้นมาบน Stage และสามารถใส่ Comment สั้นๆ ได้ด้วย
.
คำสั่ง
git commit -m "commit message"
.
⭐ 7) Git push - ใช้สำหรับอัปเดต Code ที่ถูก Commit ขึ้นบน Remote Repository
git push
.
แต่ถ้าเราเขียน Code ใน Branch ใหม่ที่ยังไม่มีบน Remote Repository ให้ใช้คำสั่ง
git push --set-upstream
.
หรือ
git push -u origin
.
⭐ 8) Git pull - รับการอัปเดตจาก Remote Repository มาในเครื่องของเรา
.
คำสั่ง
git pull
.
⭐ 9) Git revert - คำสั่งยกเลิกการอัปเดตจากฝั่งเราออกจาก Remote Repository
*ต้องใช้อย่างระวังเพราะอาจจะพลาดลบบางอย่างที่ไม่ต้องการได้
.
คำสั่ง
git revert
.
⭐ 10) Git merge - ใช้สำหรับรวม Branch ที่ต้องการเข้าด้วยกัน
.
คำสั่ง
git merge
.
ครบแล้วกับ 10 คำสั่ง Git เบื้องต้นที่มือใหม่ควรรู้ หวังว่าจะเป็นประโยชน์กับเพื่อนๆ นะคะ 😍
.
borntoDev - 🦖 สร้างการเรียนรู้ที่ดีสำหรับสายไอทีในทุกวัน
同時也有4部Youtube影片,追蹤數超過12萬的網紅prasertcbs,也在其Youtube影片中提到,เนื้อหาในคลิปนี้จะเป็นการจำลองสถานการณ์ว่าเรามีไฟล์ต่าง ๆ อยู่ใน folder ก่อนที่จะมาใช้ git และ github โดยสาธิตให้เห็นถึงขั้นตอนในการ ► 03:32 ทำ git i...
git push 在 純靠北工程師 Facebook 八卦
#純靠北工程師2k8
據說噗浪目前陷入火海了
在此呼應噗浪防火三步驟
1. git commit
2. git push
3. 塊陶啊啊啊啊啊
www.plurk.com/p/nmgs3j
📢 匿名發文請至 https://kaobei.engineer/cards/create
🥙 全平台留言 https://kaobei.engineer/cards/show/3320
git push 在 純靠北工程師 Facebook 八卦
#純靠北工程師4ug
----------
前輩永安
今天看見您的commit
把所有interface type的名稱由`Xxx`更名為`XxxStub`
把所有struct type的名稱更名為`XxxImpl`
是在哈囉?
您不看公司guideline,
不信clean code也算了。
您這commit還要不經PR,
直接 git push -f 到 master
(¬_¬;)
令我不得不靠北您
ψ( ` ∇ ´ )ψ
----------
💖 純靠北官方 Discord 歡迎在這找到你的同溫層!
👉 https://discord.gg/tPhnrs2
----------
💖 全平台留言、文章詳細內容
👉 https://init.engineer/cards/show/6280
git push 在 prasertcbs Youtube 的評價
เนื้อหาในคลิปนี้จะเป็นการจำลองสถานการณ์ว่าเรามีไฟล์ต่าง ๆ อยู่ใน folder ก่อนที่จะมาใช้ git และ github โดยสาธิตให้เห็นถึงขั้นตอนในการ
► 03:32 ทำ git init เพื่อสร้าง local repository ขึ้นมา
► 04:25 การสร้าง remote repository บน github
► 07:54 การกำหนด user.name และ email ของ git (สร้างไฟล์ .gitconfig)
► 09:07 การ commit change ด้วย Visual Studio Code
► 09:30 การ push (ส่ง) ไฟล์จาก local repository ไปยัง remote repository (บน github)
► 13:21 การ pull (ดึง) ไฟล์จาก remote repository (บน github) ลงมายัง local repository (local hard drive)
► 14:37 การ sync (push/pull) ไฟล์จาก local และ remote repository
เชิญสมัครเป็นสมาชิกของช่องนี้ได้ที่ ► https://www.youtube.com/subscription_center?add_user=prasertcbs
playlist สอน git เบื้องต้น ► https://www.youtube.com/playlist?list=PLoTScYm9O0GGsV1ZAyP4m_iyAbflQrKrX
playlist สอนภาษา Python ► https://www.youtube.com/playlist?list=PLoTScYm9O0GH4YQs9t4tf2RIYolHt_YwW
playlist สอนภาษาไพธอน Python OOP ► https://www.youtube.com/playlist?list=PLoTScYm9O0GEIZzlTKPUiOqkewkWmwadW
playlist สอน Python 3 GUI ► https://www.youtube.com/playlist?list=PLoTScYm9O0GFB1Y3cCmb9aPD5xRB1T11y
playlist สอนภาษา C เบื้องต้น ► https://www.youtube.com/playlist?list=PLoTScYm9O0GHHgz0S1tSyIl7vkG0y105z
playlist สอนภาษา C++ ► https://www.youtube.com/playlist?list=PLoTScYm9O0GEfZwqM2KyCBcPTVsc6cU_i
playlist สอนภาษา C# ► https://www.youtube.com/playlist?list=PLoTScYm9O0GE4trr-XPozJRwaY7V9hx8K
playlist สอนภาษา Java ► https://www.youtube.com/playlist?list=PLoTScYm9O0GF26yW0zVc2rzjkygafsILN
playlist สอนภาษา PHP เบื้องต้น ► https://www.youtube.com/playlist?list=PLoTScYm9O0GH_6LARFxozL_viEsXV2wgO
playlist สอนภาษา R เบื้องต้น ► https://www.youtube.com/playlist?list=PLoTScYm9O0GF6qjrRuZFSHdnBXD2KVICp
#prasertcbs #prasertcbs_git #prasertcbs_github
git push 在 prasertcbs Youtube 的評價
เนื้อหาจะเป็นการจำลองสถานการณ์ว่าเราได้พัฒนาโปรแกรมขึ้นมา โดย source code เก็บอยู่ใน folder โดยไม่มีการใช้โปรแกรมสำหรับจัดการเวอร์ชั่นของซอฟแวร์มาก่อน ลองมาดูว่าหากต้องการใช้ git เพื่อที่จะทำ version control ให้กับ source code ใน folder นี้จะต้องทำอย่างไร โดยมีคำสั่งหลัก ๆ ที่ใช้เรียงตามลำดับดังนี้
การใช้ git init เพื่อสร้าง local repository ให้กับ project/folder
การใช้ git config --global user.name "username" เพื่อกำหนดชื่อผู้ใช้
การใช้ git config --global user.email "me@anyemail.com" เพื่อกำหนด email ของผู้ใช้
การใช้ git add .
การใช้ git commit
การใช้ git remote add origin https://github.com/prasertcbs/atlas.git
การใช้ git push -u origin master
เชิญสมัครเป็นสมาชิกของช่องนี้ได้ที่ ► https://www.youtube.com/subscription_center?add_user=prasertcbs
playlist สอน git เบื้องต้น ► https://www.youtube.com/playlist?list=PLoTScYm9O0GGsV1ZAyP4m_iyAbflQrKrX
playlist สอนภาษา Python ► https://www.youtube.com/playlist?list=PLoTScYm9O0GH4YQs9t4tf2RIYolHt_YwW
playlist สอนภาษาไพธอน Python OOP ► https://www.youtube.com/playlist?list=PLoTScYm9O0GEIZzlTKPUiOqkewkWmwadW
playlist สอน Python 3 GUI ► https://www.youtube.com/playlist?list=PLoTScYm9O0GFB1Y3cCmb9aPD5xRB1T11y
playlist สอนภาษา C เบื้องต้น ► https://www.youtube.com/playlist?list=PLoTScYm9O0GHHgz0S1tSyIl7vkG0y105z
playlist สอนภาษา C++ ► https://www.youtube.com/playlist?list=PLoTScYm9O0GEfZwqM2KyCBcPTVsc6cU_i
playlist สอนภาษา C# ► https://www.youtube.com/playlist?list=PLoTScYm9O0GE4trr-XPozJRwaY7V9hx8K
playlist สอนภาษา Java ► https://www.youtube.com/playlist?list=PLoTScYm9O0GF26yW0zVc2rzjkygafsILN
playlist สอนภาษา PHP เบื้องต้น ► https://www.youtube.com/playlist?list=PLoTScYm9O0GH_6LARFxozL_viEsXV2wgO
playlist สอนภาษา R เบื้องต้น ► https://www.youtube.com/playlist?list=PLoTScYm9O0GF6qjrRuZFSHdnBXD2KVICp
#prasertcbs #prasertcbs_git #prasertcbs_github
git push 在 prasertcbs Youtube 的評價
เชิญสมัครเป็นสมาชิกของช่องนี้ได้ที่ ► https://www.youtube.com/subscription_center?add_user=prasertcbs
playlist สอน Jupyter Notebook ► https://www.youtube.com/playlist?list=PLoTScYm9O0GErrygsfQtDtBT4CloRkiDx
playlist สอน git เบื้องต้น ► https://www.youtube.com/playlist?list=PLoTScYm9O0GGsV1ZAyP4m_iyAbflQrKrX
playlist สอนภาษา Python ► https://www.youtube.com/playlist?list=PLoTScYm9O0GH4YQs9t4tf2RIYolHt_YwW
playlist สอนภาษาไพธอน Python OOP ► https://www.youtube.com/playlist?list=PLoTScYm9O0GEIZzlTKPUiOqkewkWmwadW
playlist สอน Python 3 GUI ► https://www.youtube.com/playlist?list=PLoTScYm9O0GFB1Y3cCmb9aPD5xRB1T11y
playlist สอนภาษา C เบื้องต้น ► https://www.youtube.com/playlist?list=PLoTScYm9O0GHHgz0S1tSyIl7vkG0y105z
playlist สอนภาษา C++ ► https://www.youtube.com/playlist?list=PLoTScYm9O0GEfZwqM2KyCBcPTVsc6cU_i
playlist สอนภาษา C# ► https://www.youtube.com/playlist?list=PLoTScYm9O0GE4trr-XPozJRwaY7V9hx8K
playlist สอนภาษา Java ► https://www.youtube.com/playlist?list=PLoTScYm9O0GF26yW0zVc2rzjkygafsILN
playlist สอนภาษา PHP เบื้องต้น ► https://www.youtube.com/playlist?list=PLoTScYm9O0GH_6LARFxozL_viEsXV2wgO
playlist สอนภาษา R เบื้องต้น ► https://www.youtube.com/playlist?list=PLoTScYm9O0GF6qjrRuZFSHdnBXD2KVICp
git push 在 Git Push 上傳到GitHub - YouTube 的八卦
Git 教學:如何 Push 上傳到GitHub?網站:https://gitbook.tw實體課程:https://5xruby.tw/talks/ git /線上課程:https://campus.5xruby.tw/p/ git. ... <看更多>