Automatically translated.View original post

Git. Why use it?.!!

# Web Site Writing Basics # git # Lemon 8 Howtoo # Trending # Drug sign with lemon8

Git is a tool used for Version Control System (VCS) or a system that helps record and manage the "version" of editing files (especially the Code) in order and back to edit them. If you want to visualize it easily, think about when we make a report and have a file called Report _ Actual Version _ DocxReport _ Actual Version _ Edit _ DocxReport _ Actual Version _ Send Teacher _ This is for sure. DocxGit will change this way to only one file, but we can go back in time to see all the changes in each period. What can Git do? Recorded Changes Benefits (Commit) Record who edits what lines and when Revert (Undo) If you write a code and break it, you can go back to the version that works immediately. Branching & Merging split "branches" and try new features without affecting the main code. Collaboration allows many programmers to work on the same project without overwriting the code backup when deposited on the cloud (such as GitHub). Your code will be safe even if the computer breaks down the basic steps to use Git (Git Workflow) gory init: Create Repository in the project git add.: Prepare files Staging Area git committed -m "Explanatory Message": Save changes to the git push: Send a code saved on our computer and stored on the server (such as GitHub / GitLab). The difference between Git and GitHub is often confused between these two words.: Git: It is a software tool installed on our machine to store the history of GitHub / GitLab files: it is a "website" (Service) that serves as a deposit of our Git files on the Internet so that our teammates can pull them to work. An amazing thing: Git was created by Linus Torvalds. (Linux creator) Because he's frustrated with the slow and complicated version of the old-time management system.

3/12 Edited to

... Read moreจากประสบการณ์ใช้งาน Git เอง ผมพบว่า Git ไม่ได้ช่วยแค่การจัดเก็บประวัติไฟล์อย่างเดียว แต่ยังทำให้เราควบคุมและจัดการโค้ดได้อย่างมีระบบมากขึ้นมาก ตัวอย่างเช่น เมื่อเราพัฒนาโปรเจกต์ขนาดใหญ่ที่มีนักพัฒนาหลายคนทำงานพร้อมกัน การใช้ Git ช่วยลดความผิดพลาดจากการเขียนโค้ดทับกัน และยังช่วยให้ง่ายต่อการรวมโค้ดในแต่ละฟีเจอร์เข้าด้วยกันผ่าน Branching และ Merging ผมมักใช้ฟีเจอร์ Commit บ่อยๆ เพื่อบันทึกประวัติการเปลี่ยนแปลงแต่ละครั้ง พร้อมกับข้อความอธิบายที่ชัดเจน ซึ่งช่วยเวลาเราต้องย้อนกลับไปแก้ไขในอนาคต หรือเมื่อมีปัญหาเกิดขึ้น นอกจากนี้การที่ Git สามารถจัดเก็บโค้ดไว้บนแพลตฟอร์มอย่าง GitHub ก็ทำให้ข้อมูลปลอดภัย ไม่ต้องกลัวข้อมูลสูญหายจากคอมพิวเตอร์เสีย การทำงานกับ Git แรกๆ อาจจะดูซับซ้อน แต่ถ้าเริ่มเข้าใจขั้นตอนพื้นฐาน เช่น git init, git add, git commit, git push แล้ว จะช่วยให้การจัดการโปรเจกต์ของเรามีประสิทธิภาพและสามารถทำงานร่วมกับทีมได้สะดวกขึ้นมากครับ สุดท้าย Git ไม่ได้เป็นแค่เครื่องมือของโปรแกรมเมอร์เท่านั้น แต่ยังเหมาะกับคนที่ต้องการจัดการไฟล์หรือเอกสารหลายเวอร์ชัน เพื่อให้สามารถย้อนกลับไปดูข้อมูลหรือแก้ไขเวอร์ชันเก่าได้ง่าย เช่นเดียวกับตัวอย่างรายงานที่ผู้เขียนได้ยกขึ้นมาให้เห็นภาพครับ