    {"id":2633,"date":"2024-01-30T08:37:26","date_gmt":"2024-01-30T08:37:26","guid":{"rendered":"https:\/\/student-activity.binus.ac.id\/csc\/?p=2633"},"modified":"2024-07-17T12:50:43","modified_gmt":"2024-07-17T12:50:43","slug":"git-basic","status":"publish","type":"post","link":"https:\/\/student-activity.binus.ac.id\/csc\/2024\/01\/git-basic\/","title":{"rendered":"Git Basic"},"content":{"rendered":"<p style=\"text-align: center\"><span style=\"font-weight: 400\">Git as Version Control<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2634\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2024\/01\/1-2.png\" alt=\"\" width=\"602\" height=\"339\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 Dalam mengerjakan tak jarang kita membuat revisi tetapi kita tidak mau merubah file sebelumnya alhasil kita membuat replikasi file yang sama dengan nama yang berbeda, hal ini sungguh sangat merepotkan jika kita lupa perbedaan antara satu versi dengan versi lainnya. Seiring berjalannya waktu munculah <\/span><em><span style=\"font-weight: 400\">version control <\/span><\/em><span style=\"font-weight: 400\">untuk mengatasi masalah ini. <\/span><em><span style=\"font-weight: 400\">Version control <\/span><\/em><span style=\"font-weight: 400\">adalah suatu sistem yang merekam perubahan file dari waktu ke waktu, kita bisa melihat perubahan yang kita lakukan sebelumnya dengan mudah. <\/span><em><span style=\"font-weight: 400\">Version control <\/span><\/em><span style=\"font-weight: 400\">sebenarnya ada 3 jenis yaitu:\u00a0<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2635\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2024\/01\/2-2.png\" alt=\"\" width=\"602\" height=\"339\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 <strong>1. Local version control<\/strong><\/span><\/p>\n<p style=\"text-align: justify\"><em><span style=\"font-weight: 400\">Local version control<\/span><\/em><span style=\"font-weight: 400\"> adalah <\/span><em><span style=\"font-weight: 400\">version control <\/span><\/em><span style=\"font-weight: 400\">yang berjalan hanya pada <\/span><em><span style=\"font-weight: 400\">local <\/span><\/em><span style=\"font-weight: 400\">komputer. jadi setiap kali melakukan perubahan akan hanya terekam untuk <\/span><em><span style=\"font-weight: 400\">local <\/span><\/em><span style=\"font-weight: 400\">komputer saja, ini bukan jadi masalah kalau hanya melakukan pengembangan aplikasi\/tugas seorang diri. Jika butuh kolaborasi maka akan sulit harus replikasi secara manual dengan kolabolatornya.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 <strong>2. Centralized version control<\/strong><\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Berbeda dengan <\/span><em><span style=\"font-weight: 400\">Local Version Control<\/span><\/em><span style=\"font-weight: 400\">, <\/span><em><span style=\"font-weight: 400\">Centralized <\/span><\/em><span style=\"font-weight: 400\">lebih mengacu pada penyimpanan riwayat pada <\/span><em><span style=\"font-weight: 400\">server <\/span><\/em><span style=\"font-weight: 400\">terpusat. Jadi ketika dibutuhkan kolaborasi, kolaborator tinggal mengambil dari <\/span><em><span style=\"font-weight: 400\">server <\/span><\/em><span style=\"font-weight: 400\">terpusat tersebut. Pendekatan ini sangat berpaku pada <\/span><em><span style=\"font-weight: 400\">server <\/span><\/em><span style=\"font-weight: 400\">pusat jadi setiap kali <\/span><em><span style=\"font-weight: 400\">server <\/span><\/em><span style=\"font-weight: 400\">itu <\/span><em><span style=\"font-weight: 400\">down<\/span><\/em><span style=\"font-weight: 400\">\/punya masalah kita tidak bisa melihat riwayat atau melakukan perubahan. Contoh dari <\/span><em><span style=\"font-weight: 400\">centralized version control <\/span><\/em><span style=\"font-weight: 400\">adalah <em>Subversion<\/em>.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 <strong>3. Distributed version control<\/strong><\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Pada <\/span><em><span style=\"font-weight: 400\">distributed version control<\/span><\/em><span style=\"font-weight: 400\">, tidak hanya terpaku pada <\/span><em><span style=\"font-weight: 400\">server <\/span><\/em><span style=\"font-weight: 400\">terpusat karena riwayat yang diambil bukan hanya yang terakhir tetapi seluruh riwayat yang ada. Hal ini memungkinkan kita melakukan melakukan perubahan tanpa harus terhubung dengan <\/span><em><span style=\"font-weight: 400\">server <\/span><\/em><span style=\"font-weight: 400\">terpusat. Contoh dari <\/span><em><span style=\"font-weight: 400\">Distributed version control <\/span><\/em><span style=\"font-weight: 400\">adalah Git, Mercurial. dll.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Contoh dari <\/span><em><span style=\"font-weight: 400\">version control <\/span><\/em><span style=\"font-weight: 400\">adalah Mercurial, Subversion, CVS, RCS, Git.\u00a0<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 Git awalnya tercipta karena kesulitan pada pengembangan linux oleh Linus Torvald dan teman-temanya pada 1991-2002, tetapi jika setiap kali kontribusi baru terhadap pengembangan linux mereka harus <\/span><em><span style=\"font-weight: 400\">archived file<\/span><\/em><span style=\"font-weight: 400\"> secara manual dan mengirimnya. Sebenarnya mereka sudah memakai <\/span><em><span style=\"font-weight: 400\">version control<\/span><\/em><span style=\"font-weight: 400\"> bernama BitKeeper karena hubungan antara mereka kurang baik Linus Torvald membuat <\/span><em><span style=\"font-weight: 400\">Version Control<\/span><\/em><span style=\"font-weight: 400\"> sendiri bernama Git, hingga akhirnya Git sebagai aplikasi <\/span><em><span style=\"font-weight: 400\">open source <\/span><\/em><span style=\"font-weight: 400\">pertama kali diperkenalkan tahun 2005 dan sekarang menjadi <\/span><em><span style=\"font-weight: 400\">version control<\/span><\/em><span style=\"font-weight: 400\"> yang paling banyak dipakai. Menurut <em>survey<\/em> yang dilakukan <em>stackoverflow<\/em> tentang <\/span><em><span style=\"font-weight: 400\">version control<\/span><\/em><span style=\"font-weight: 400\"> yang dipakai didapati sebanyak 93% memakai Git.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Jika anda belum pernah menginstall Git, bisa untuk menginstalnya pada <\/span><a href=\"https:\/\/git-scm.com\/downloads\"><span style=\"font-weight: 400\">https:\/\/git-scm.com\/downloads<\/span><\/a><span style=\"font-weight: 400\"> sesuai dengan arsitektur dan <\/span><em><span style=\"font-weight: 400\">operating system <\/span><\/em><span style=\"font-weight: 400\">komputer masing-masing. Lalu bagaimana alur <\/span><em><span style=\"font-weight: 400\">workflow <\/span><\/em><span style=\"font-weight: 400\">dari Git ini? Git menerapkan 3 <\/span><em><span style=\"font-weight: 400\">states <\/span><\/em><span style=\"font-weight: 400\">hingga akhirnya perubahan disimpan secara permanen.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 <strong>1. Working Directory<\/strong><\/span><\/p>\n<p style=\"text-align: justify\"><em><span style=\"font-weight: 400\">Working Directory<\/span><\/em><span style=\"font-weight: 400\"> adalah tempat Git menandai perubahan yang ada terjadi pada file. Perubahan yang dimaksud adalah penambahan, penghapusan, edit file.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0<strong> 2. Staging Area\/Index<\/strong><\/span><\/p>\n<p style=\"text-align: justify\"><em><span style=\"font-weight: 400\">Staging area<\/span><\/em><span style=\"font-weight: 400\"> adalah <\/span><em><span style=\"font-weight: 400\">section <\/span><\/em><span style=\"font-weight: 400\">dimana file sudah disiapkan untuk disimpan secara permanen nantinya, <\/span><em><span style=\"font-weight: 400\">staging area <\/span><\/em><span style=\"font-weight: 400\">akan menyimpan perubahan file.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 <strong>3. Repository<\/strong><\/span><\/p>\n<p style=\"text-align: justify\"><em><span style=\"font-weight: 400\">Repository <\/span><\/em><span style=\"font-weight: 400\">adalah tempat dimana semua file dan database riwayat versi file disimpan. Terdapat 2 jenis <\/span><em><span style=\"font-weight: 400\">repository <\/span><\/em><span style=\"font-weight: 400\">yaitu <\/span><em><span style=\"font-weight: 400\">local repository <\/span><\/em><span style=\"font-weight: 400\">dan <\/span><em><span style=\"font-weight: 400\">remote repository<\/span><\/em><span style=\"font-weight: 400\">, pembahasan tentang <\/span><em><span style=\"font-weight: 400\">local <\/span><\/em><span style=\"font-weight: 400\">dan <\/span><em><span style=\"font-weight: 400\">remote <\/span><\/em><span style=\"font-weight: 400\">akan dibahas ketika praktik nanti.<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2636\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2024\/01\/3-2.png\" alt=\"\" width=\"602\" height=\"353\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Jadi setiap kali mau menyimpan perubahan di <\/span><em><span style=\"font-weight: 400\">local repository <\/span><\/em><span style=\"font-weight: 400\">harus melewati ketiga <\/span><em><span style=\"font-weight: 400\">state<\/span><\/em><span style=\"font-weight: 400\"> tersebut. Misal ada 10 perubahan yang tercatat pada <\/span><em><span style=\"font-weight: 400\">working directory <\/span><\/em><span style=\"font-weight: 400\">jika hanya ingin menyiapkan 6 file untuk disimpan secara permanen itu bisa saja.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Jika sudah menginstal Git, untuk mengecek apakah sudah terinstall atau belum dengan command \u201cGit version -v\u201d<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2638\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2024\/01\/4-2.png\" alt=\"\" width=\"372\" height=\"46\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Notes: <\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Versi dari git mungkin berbeda tergantung pada waktu anda menginstall installer-nya. per 9 Oktober 2023 versi dari git adalah 2.41.0<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Lalu kita akan melakukan konfigurasi awal pada git dengan mensetting <\/span><i><span style=\"font-weight: 400\">username <\/span><\/i><span style=\"font-weight: 400\">dan <\/span><i><span style=\"font-weight: 400\">email <\/span><\/i><span style=\"font-weight: 400\">kita dengan <\/span><em><span style=\"font-weight: 400\">command <\/span><\/em><span style=\"font-weight: 400\">\u201cgit config &#8211;global user.name &lt;Nama&gt;\u201d dan \u201cgit config &#8211;global user.email &lt;email&gt; \u201d, jika nama kalian lebih dari satu kata bisa menggunakan petik dua untuk awal dan akhir nama kalian. email yang kalian pakai adalah email yang kalian pakai untuk registrasi Github.<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2639\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2024\/01\/5-1.png\" alt=\"\" width=\"602\" height=\"57\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Untuk mengecek apakah <\/span><em><span style=\"font-weight: 400\">config <\/span><\/em><span style=\"font-weight: 400\">user.name dan user.email sudah benar dengan \u201cgit config &#8211;list &#8211;show-origin \u201d<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2640\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2024\/01\/6-1.png\" alt=\"\" width=\"602\" height=\"195\" \/><\/p>\n<p style=\"text-align: justify\"><em><span style=\"font-weight: 400\">config optional<\/span><\/em><span style=\"font-weight: 400\">:<\/span><\/p>\n<ul>\n<li style=\"text-align: justify\"><span style=\"font-weight: 400\">Git <\/span><span style=\"font-weight: 400\">config<\/span><span style=\"font-weight: 400\"> &#8211;global core.editor &#8220;code &#8211;wait&#8221;<\/span><\/li>\n<\/ul>\n<p style=\"text-align: justify\"><em><span style=\"font-weight: 400\">command <\/span><\/em><span style=\"font-weight: 400\">itu digunakan supaya dalam menggunakan teks editor visual studio code sebagai <\/span><em><span style=\"font-weight: 400\">default code editor <\/span><\/em><span style=\"font-weight: 400\">dan akan menunggu sampai <\/span><em><span style=\"font-weight: 400\">editor <\/span><\/em><span style=\"font-weight: 400\">itu ditutup baru bisa melanjutkan <\/span><em><span style=\"font-weight: 400\">command <\/span><\/em><span style=\"font-weight: 400\">di terminal.<\/span><\/p>\n<ul>\n<li style=\"text-align: justify\"><span style=\"font-weight: 400\">git <\/span><span style=\"font-weight: 400\">config<\/span><span style=\"font-weight: 400\"> &#8211;global diff.tool &#8220;default-difftool&#8221;<\/span><\/li>\n<\/ul>\n<p style=\"text-align: justify\"><em><span style=\"font-weight: 400\">command <\/span><\/em><span style=\"font-weight: 400\">itu digunakan untuk melakukan konfigurasi <\/span><em><span style=\"font-weight: 400\">diff <\/span><\/em><i><span style=\"font-weight: 400\">tool<\/span><\/i><span style=\"font-weight: 400\">.<\/span><\/p>\n<ul>\n<li style=\"text-align: justify\"><span style=\"font-weight: 400\">git <\/span><span style=\"font-weight: 400\">config<\/span><span style=\"font-weight: 400\"> &#8211;global difftool.default-difftool.cmd &#8220;code &#8211;wait &#8211;diff\u00a0 \\$LOCAL \\$REMOTE&#8221;\u00a0<\/span><\/li>\n<\/ul>\n<p style=\"text-align: justify\"><em><span style=\"font-weight: 400\">command <\/span><\/em><span style=\"font-weight: 400\">itu digunakan untuk menentukan perintah yang akan digunakan oleh alat pembanding &#8220;default-difftool.&#8221; dan akan menggunakan visual studio code untuk membandingkan versi <\/span><em><span style=\"font-weight: 400\">local <\/span><\/em><span style=\"font-weight: 400\">dan <\/span><em><span style=\"font-weight: 400\">remote<\/span><\/em><span style=\"font-weight: 400\">.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Jika sudah melakukan konfigurasi, lalu bagaimana cara membuat <\/span><em><span style=\"font-weight: 400\">local repository<\/span><\/em><span style=\"font-weight: 400\">? <\/span><span style=\"font-weight: 400\">cara membuat <\/span><em><span style=\"font-weight: 400\">local repository <\/span><\/em><span style=\"font-weight: 400\">adalah dengan menginisialisasikan dalam suatu folder menggunakan <\/span><em><span style=\"font-weight: 400\">command <\/span><\/em><span style=\"font-weight: 400\">\u201cgit init\u201d.<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2641\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2024\/01\/7-1.png\" alt=\"\" width=\"602\" height=\"56\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">jika sudah melakukan inisialisasi maka akan ke bentuk file .git<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2642\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2024\/01\/8-1.png\" alt=\"\" width=\"602\" height=\"84\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">sebagai contoh <\/span><em><span style=\"font-weight: 400\">workflow <\/span><\/em><span style=\"font-weight: 400\">git, akan ditambahkan file test1.txt dengan isinya yaitu \u201cini test1.txt\u201d<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2643\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2024\/01\/9-1.png\" alt=\"\" width=\"454\" height=\"102\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">untuk melihat kita ada di <\/span><em><span style=\"font-weight: 400\">stages <\/span><\/em><span style=\"font-weight: 400\">mana, gunakan perintah \u201cgit status\u201d, didapati kalau kita masih ada di <\/span><em><span style=\"font-weight: 400\">working directory<\/span><\/em><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2644\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2024\/01\/10-1.png\" alt=\"\" width=\"602\" height=\"176\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Kalau test1 mau di track perubahannya bisa memindahkannya ke <\/span><em><span style=\"font-weight: 400\">staging area <\/span><\/em><span style=\"font-weight: 400\">dengan \u201cgit add test1.txt\u201d<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2645\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2024\/01\/11-1.png\" alt=\"\" width=\"477\" height=\"222\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">kalau mau memasukan perubahan file ke <\/span><em><span style=\"font-weight: 400\">local repository <\/span><\/em><span style=\"font-weight: 400\">dengan menggunakan <\/span><em><span style=\"font-weight: 400\">command <\/span><\/em><span style=\"font-weight: 400\">\u201cgit commit -m \u201cinitial test1.txt\u201d, menggunakan -m untuk menjelaskan <\/span><em><span style=\"font-weight: 400\">message <\/span><\/em><span style=\"font-weight: 400\">dari <\/span><em><span style=\"font-weight: 400\">commit <\/span><\/em><span style=\"font-weight: 400\">ini apa.<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2646\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2024\/01\/12-1.png\" alt=\"\" width=\"602\" height=\"83\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2647\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2024\/01\/13-1.png\" alt=\"\" width=\"602\" height=\"127\" \/><\/span><span style=\"font-weight: 400\">Untuk mengecek apakah sudah benar-benar masuk ke dalam <\/span><em><span style=\"font-weight: 400\">local repository <\/span><\/em><span style=\"font-weight: 400\">dengan menggunakan \u201cgit log\u201d akan didapati <\/span><em><span style=\"font-weight: 400\">hash value <\/span><\/em><span style=\"font-weight: 400\">dari hasil <\/span><em><span style=\"font-weight: 400\">commit <\/span><\/em><span style=\"font-weight: 400\">\u201cinitial test1.txt\u201d. Setiap <\/span><em><span style=\"font-weight: 400\">commit <\/span><\/em><span style=\"font-weight: 400\">selesai akan mempunyai <em>data <\/em><\/span><em><span style=\"font-weight: 400\">hash value<\/span><\/em><span style=\"font-weight: 400\">, <\/span><em><span style=\"font-weight: 400\">author <\/span><\/em><span style=\"font-weight: 400\">dan <\/span><em><span style=\"font-weight: 400\">date<\/span><\/em><span style=\"font-weight: 400\">. <\/span><em><span style=\"font-weight: 400\">Hash value <\/span><\/em><span style=\"font-weight: 400\">terbentuk bukan hanya dari perubahan file tetapi juga dari <\/span><em><span style=\"font-weight: 400\">author<\/span><\/em><span style=\"font-weight: 400\">, <\/span><em><span style=\"font-weight: 400\">parent <\/span><\/em><span style=\"font-weight: 400\">dan <\/span><em><span style=\"font-weight: 400\">message<\/span><\/em><span style=\"font-weight: 400\">, dengan menggunakan algoritma <\/span><em><span style=\"font-weight: 400\">hashing <\/span><\/em><span style=\"font-weight: 400\">SHA-1 dengan mempertimbangkan parameter perubahan file, <\/span><em><span style=\"font-weight: 400\">author<\/span><\/em><span style=\"font-weight: 400\">, <\/span><em><span style=\"font-weight: 400\">parent <\/span><\/em><span style=\"font-weight: 400\">dan <\/span><em><span style=\"font-weight: 400\">message <\/span><\/em><span style=\"font-weight: 400\">maka terbentuklah <\/span><em><span style=\"font-weight: 400\">hash value <\/span><\/em><span style=\"font-weight: 400\">tersebut. <\/span><em><span style=\"font-weight: 400\">Hash <\/span><\/em><span style=\"font-weight: 400\">pada <\/span><em><span style=\"font-weight: 400\">commit <\/span><\/em><span style=\"font-weight: 400\">ini digunakan untuk menentukan integritas data. Maksudnya setiap kali melakukan commit akan merujuk juga pada<\/span><em><span style=\"font-weight: 400\"> hash commit<\/span><\/em><i><span style=\"font-weight: 400\">&#8211;<\/span><\/i><span style=\"font-weight: 400\">an sebelumnya. Jika diilustrasikan akan seperti ini<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2648\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2024\/01\/14-1.png\" alt=\"\" width=\"602\" height=\"192\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Jika dipaksa rubah perubahan file\/<\/span><i><span style=\"font-weight: 400\">author<\/span><\/i><span style=\"font-weight: 400\">\/<\/span><i><span style=\"font-weight: 400\">parent<\/span><\/i><span style=\"font-weight: 400\">\/<\/span><i><span style=\"font-weight: 400\">message <\/span><\/i><span style=\"font-weight: 400\">akan merusak <\/span><i><span style=\"font-weight: 400\">hash value <\/span><\/i><span style=\"font-weight: 400\">dan akan rusak.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Referensi:<\/span><\/p>\n<ul>\n<li style=\"text-align: justify\"><a href=\"https:\/\/www.researchgate.net\/publication\/340973855_An_analysis_on_Version_Control_Systems\"><span style=\"font-weight: 400\">https:\/\/www.researchgate.net\/publication\/340973855_An_analysis_on_Version_Control_Systems<\/span><\/a><\/li>\n<li style=\"text-align: justify\"><a href=\"https:\/\/stackoverflow.blog\/2023\/01\/09\/beyond-git-the-other-version-control-systems-developers-use\/\"><span style=\"font-weight: 400\">https:\/\/stackoverflow.blog\/2023\/01\/09\/beyond-git-the-other-version-control-systems-developers-use\/<\/span><\/a><\/li>\n<li style=\"text-align: justify\"><a href=\"https:\/\/medium.com\/free-code-camp\/learn-the-basics-of-git-in-under-10-minutes-da548267cc91\"><span style=\"font-weight: 400\">https:\/\/medium.com\/free-code-camp\/learn-the-basics-of-git-in-under-10-minutes-da548267cc91<\/span><\/a><\/li>\n<\/ul>\n<p style=\"text-align: justify\">\n","protected":false},"excerpt":{"rendered":"<p>Git as Version Control \u00a0 \u00a0 \u00a0 \u00a0 Dalam mengerjakan tak jarang kita membuat revisi tetapi kita tidak mau merubah file sebelumnya alhasil kita membuat replikasi file yang sama dengan nama yang berbeda, hal ini sungguh sangat merepotkan jika kita lupa perbedaan antara satu versi dengan versi lainnya. Seiring berjalannya waktu munculah version control untuk [&hellip;]<\/p>\n","protected":false},"author":42,"featured_media":2634,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,4],"tags":[],"class_list":["post-2633","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles","category-featured"],"_links":{"self":[{"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/posts\/2633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/comments?post=2633"}],"version-history":[{"count":2,"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/posts\/2633\/revisions"}],"predecessor-version":[{"id":3039,"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/posts\/2633\/revisions\/3039"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/media\/2634"}],"wp:attachment":[{"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/media?parent=2633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/categories?post=2633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/tags?post=2633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}