{"id":3749,"date":"2023-11-29T17:28:39","date_gmt":"2023-11-29T10:28:39","guid":{"rendered":"https:\/\/www.marketenterprise.vn\/blog\/?p=3749"},"modified":"2023-11-29T18:10:12","modified_gmt":"2023-11-29T11:10:12","slug":"git-1-vai-kien-thuc-co-ban","status":"publish","type":"post","link":"https:\/\/www.marketenterprise.vn\/blog\/git-1-vai-kien-thuc-co-ban.html","title":{"rendered":"GIT &#8211; 1 v\u00e0i ki\u1ebfn th\u1ee9c c\u01a1 b\u1ea3n c\u1ea7n hi\u1ec3u r\u00f5"},"content":{"rendered":"<h2>Nh\u1eefng ki\u1ebfn th\u1ee9c li\u00ean quan \u0111\u1ebfn t\u1ea7ng l\u01b0u tr\u1eef c\u1ee7a <a href=\"https:\/\/www.marketenterprise.vn\/blog\/git-la-gi.html\">GIT<\/a><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/11\/29172753\/image2.jpg\" alt=\"ki\u1ebfn th\u1ee9c Git - l\u01b0u tr\u1eef ki\u1ebfn th\u1ee9c\" width=\"481\" height=\"455\" class=\"aligncenter wp-image-3755 size-full\" srcset=\"https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/11\/29172753\/image2.jpg 481w, https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/11\/29172753\/image2-300x284.jpg 300w\" sizes=\"auto, (max-width: 481px) 100vw, 481px\" \/><\/p>\n<h3><span style=\"font-weight: 400;\">Remote Repository<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">L\u00e0 n\u01a1i l\u01b0u tr\u1eef source code, data\u2026 c\u1ee7a d\u1ef1 \u00e1n \u1edf m\u1ed9t server n\u00e0o \u0111\u00f3: <a href=\"https:\/\/github.com\/\" target=\"_blank\" rel=\"noopener\">Github<\/a>, <a href=\"https:\/\/gitlab.com\/\" target=\"_blank\" rel=\"noopener\">Gitlab<\/a>, <a href=\"https:\/\/bitbucket.org\/\" target=\"_blank\" rel=\"noopener\">Bitbucket<\/a>\u2026 <\/span><\/p>\n<p><span style=\"font-weight: 400;\">V\u00ed d\u1ee5: https:\/\/github.com\/marketenterprise\/Corp-VN<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00e1c l\u1ec7nh th\u00f4ng th\u01b0\u1eddng m\u00e0 c\u00e1c b\u1ea1n thao t\u00e1c \u0111\u1ebfn remote repository:<\/span><\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">$ git clone \/\/ download to\u00e0n b\u1ed9 remote repository<\/code><\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">$ git pull, $ git fetch \/\/ t\u1ea3i source code m\u1edbi nh\u1ea5t v\u1ec1 m\u00e1y c\u1ee7a b\u1ea1n<\/code><\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">$ git push \/\/ \u0111\u01b0a source code t\u1eeb m\u00e1y b\u1ea1n l\u00ean remote repository\u00a0<\/code><\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">$ git branch \u2013all \/\/ hi\u1ec3n th\u1ecb danh s\u00e1ch c\u00e1c branch hi\u1ec7n c\u00f3 \u1edf remote repository<\/code><\/p>\n<h3><span style=\"font-weight: 400;\">Local Repository<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">L\u00e0 n\u01a1i l\u01b0u tr\u1eef source code, data\u2026 \u1edf d\u01b0\u1edbi m\u00e1y t\u00ednh c\u1ee7a b\u1ea1n<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00e1c l\u1ec7nh th\u00f4ng th\u01b0\u1eddng m\u00e0 c\u00e1c b\u1ea1n thao t\u00e1c \u0111\u1ebfn local repository<\/span><\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">$ git fetch \/\/ t\u1ea3i source code m\u1edbi nh\u1ea5t v\u1ec1 v\u00f9ng ch\u1ee9a local repository<\/code><\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">$ git checkout, $ git switch \/\/ chuy\u1ec3n source code t\u1eeb local repository sang workspace<\/code><\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">$ git commit \/\/ \u0111\u01b0a source code t\u1eeb staging area ho\u0103c workspace l\u00ean local repository<\/code><\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">$ git branch \/\/ hi\u1ec3n th\u1ecb danh s\u00e1ch hi\u1ec7n c\u00f3 \u1edf local repository<\/code><\/p>\n<h3><span style=\"font-weight: 400;\">Staging area<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">L\u00e0 nh\u1eefng thay \u0111\u1ed5i m\u00e0 b\u1ea1n mu\u1ed1n l\u01b0u t\u1ea1m tr\u01b0\u1edbc khi \u0111\u01b0a l\u00ean local repository, \u0111\u1ec3 l\u01b0u t\u1ea1m \u1edf v\u1ee5ng n\u00e0y, b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng <code>$ git add<\/code><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Ki\u1ec3m tra danh s\u00e1ch c\u00e1c file \u0111ang \u1edf Staging area: <code>$ git diff --name-only --cached<\/code><\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Workspace<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">L\u00e0 m\u1ed9t branch n\u00e0o \u0111\u00f3 m\u00e0 b\u1ea1n \u0111ang thao t\u00e1c (\u0111ang m\u1edf b\u1eb1ng m\u1ed9t tr\u00ecnh so\u1ea1n th\u1ea3o n\u00e0o \u0111\u00f3, m\u00ecnh th\u01b0\u1eddng x\u00e0i visual studio code), \u0111\u1ec3 \u0111\u01b0a m\u1ed9t branch t\u1eeb local repository qua workspace th\u00ec c\u00e1c b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng checkout ho\u1eb7c switch \u0111\u1ec1u \u0111\u01b0\u1ee3c<\/span><\/p>\n<p><span style=\"font-weight: 400;\">B\u1ea1n mu\u1ed1n ki\u1ec3m tra workspace \u0111ang \u1edf branch n\u00e0o b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng l\u1ec7nh <code>$ git status<\/code> ho\u1eb7c <code>$ git branch<\/code><\/span><\/p>\n<p><span style=\"font-weight: 400;\">B\u1ea1n mu\u1ed1n chuy\u1ec3n workspace sang nh\u00e1nh kh\u00e1c, b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng l\u1ec7nh <code>$ git switch &lt;branch&gt;<\/code><\/span><\/p>\n<h3><span style=\"font-weight: 400;\">HEAD<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">\u0110ang tr\u1ecf t\u1edbi commit cu\u1ed1i c\u00f9ng c\u1ee7a branch t\u1ea1i th\u1eddi \u0111i\u1ec3m m\u00e0 b\u1ea1n \u0111\u00e3 download branch \u0111\u00f3 v\u1ec1 m\u00e1y b\u1ea1n<\/span><\/p>\n<p><span style=\"font-weight: 400;\">B\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng l\u1ec7nh <code>$ git show HEAD<\/code> \u0111\u1ec3 xem branch d\u01b0\u1edbi m\u00e1y c\u1ee7a b\u1ea1n \u0111ang \u1edf commit n\u00e0o<\/span><\/p>\n<p><span style=\"font-weight: 400;\">HEAD~&lt;number&gt;: \u0111\u1ec3 tr\u1ecf t\u1edbi commit th\u1ee9 m\u1ea5y. <\/span><span style=\"font-weight: 400;\">V\u00ed d\u1ee5: HEAD \u2192 commit cu\u1ed1i, HEAD~1 \u2192 commit tr\u01b0\u1edbc commit cu\u1ed1i\u2026<\/span><\/p>\n<h2>S\u1ef1 nh\u1ea7m l\u1eabn c\u00f3 th\u1ec3 x\u1ea3y ra gi\u1eefa pull v\u00e0 fetch trong<\/h2>\n<p><span style=\"font-weight: 400;\">C\u1ea3 2 l\u1ec7nh \u0111\u1ec1u t\u1ea3i source code m\u1edbi nh\u1ea5t t\u1eeb remote repository v\u1ec1 m\u00e1y c\u1ee7a b\u1ea1n, nh\u01b0ng \u0111i\u1ec3m \u1ea3nh h\u01b0\u1edfng \u0111\u1ebfn v\u00f9ng ch\u1ee9a th\u00ec s\u1ebd c\u00f3 s\u1ef1 kh\u00e1c nhau:\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\"><code>$ git pull<\/code> s\u1ebd \u0111\u01b0a source code \u0111\u1ebfn workspace<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\"><code>$ git fetch<\/code> s\u1ebd \u0111\u01b0a source code \u0111\u1ebfn local repository<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">H\u00e3y xem 1 v\u00ed d\u1ee5 d\u01b0\u1edbi \u0111\u00e2y \u0111\u1ec3 b\u1ea1n c\u00f3 th\u1ec3 hi\u1ec3u r\u00f5 h\u01a1n<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">B\u1ea1n \u0111ang ph\u1ee5 tr\u00e1ch feature-1 c\u00f9ng v\u1edbi m\u1ed9t member kh\u00e1c<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">B\u1ea1n \u0111ang develop \u1edf branch feature-1 (workspace), member l\u00e0m chung v\u1edbi b\u1ea1n \u0111\u00e3 l\u00e0m xong ph\u1ea7n vi\u1ec7c c\u1ee7a m\u00ecnh, y\u00eau c\u1ea7u b\u1ea1n l\u1ea5y code m\u1edbi v\u1ec1! L\u00fac n\u00e0y m\u00ecnh n\u00ean s\u1eed d\u1ee5ng pull hay l\u00e0 fetch?<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">N\u1ebfu b\u1ea1n s\u1eed d\u1ee5ng fetch \u0111\u1ec3 t\u1ea3i v\u1ec1, b\u1ea1n s\u1ebd kh\u00f4ng th\u1ea5y code m\u1edbi \u0111\u00e2u c\u1ea3, v\u00ec sao? V\u00ec l\u00fac n\u00e0y code m\u1edbi s\u1ebd n\u1eb1m \u1edf local repository ch\u1ee9 ko ph\u1ea3i workspace<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">N\u1ebfu b\u1ea1n s\u1eed d\u1ee5ng pull \u0111\u1ec3 t\u1ea3i v\u1ec1, b\u1ea1n s\u1ebd th\u1ea5y code m\u1edbi ngay l\u1eb7p t\u1ee9c<\/span><\/li>\n<\/ul>\n<h2>Hi\u1ec3u r\u00f5 s\u1ef1 kh\u00e1c nhau gi\u1eefa checkout v\u00e0 restore<\/h2>\n<p><span style=\"font-weight: 400;\">Checkout c\u00f3 2 ch\u1ee9c n\u0103ng: chuy\u1ec3n ho\u1eb7c t\u1ea1o nh\u00e1nh v\u00e0 ph\u1ee5c h\u1ed3i d\u1eef li\u1ec7u c\u1ee7a file<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Restore ch\u1ec9 c\u00f3 1 ch\u1ee9c n\u0103ng: ph\u1ee5c h\u1ed3i d\u1eef li\u1ec7u c\u1ee7a file<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00f3 th\u1ec3 n\u00f3i Restore l\u00e0 m\u1ed9t ph\u1ea7n c\u1ee7a Checkout \u2192 Checkout = Switch + Restore<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Vi\u1ec7c s\u1eed d\u1ee5ng switch \u0111\u1ec3 chuy\u1ec3n\/t\u1ea1o nh\u00e1nh vs restore \u0111\u1ec3 ph\u1ee5c h\u1ed3i file s\u1ebd gi\u00fap c\u00e1c b\u1ea1n \u0111\u1ee1 r\u1ed1i h\u01a1n vi\u1ec7c s\u1eed d\u1ee5ng checkout<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Restore s\u1ebd ph\u1ee5c h\u1ed3i d\u1eef li\u1ec7u t\u1eeb HEAD v\u00e0 \u1ea3nh h\u01b0\u1edfng \u0111\u1ebfn v\u00f9ng m\u00e0 b\u1ea1n mu\u1ed1n ph\u1ee5c h\u1ed3i: workspace ho\u1eb7c staging area, c\u00e1c b\u1ea1n quay l\u1ea1i m\u1ee5c 1 \u0111\u1ec3 hi\u1ec3u HEAD l\u00e0 c\u00e1i g\u00ec nh\u00e1<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Trong qu\u00e1 tr\u00ecnh s\u1eed d\u1ee5ng restore, b\u1ea1n s\u1ebd th\u1ea5y 3 option ph\u1ed5 bi\u1ebfn<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\"><code>$ git restore --worktree<\/code> \u2192 ph\u1ee5c h\u1ed3i file \u1edf v\u00f9ng workspace, c\u00e1c file \u1edf index (\u0111\u00e3 add) s\u1ebd kh\u00f4ng \u1ea3nh h\u01b0\u1edfng<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\"><code>$ git restore --staged<\/code> \u2192 ph\u1ee5c h\u1ed3i file \u1edf v\u00f9ng index<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\"><code>$ git restore --source=&lt;&gt;<\/code> \u2192 ch\u1ec9 \u0111\u1ecbnh n\u01a1i l\u1ea5y d\u1eef li\u1ec7u \u0111\u1ec3 ph\u1ee5c h\u1ed3i<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">V\u1edbi nh\u1eefng file \u0111\u00e3 commit th\u00ec c\u00e1c b\u1ea1n v\u1eabn c\u00f3 th\u1ec3 restore \u0111\u01b0\u1ee3c nh\u01b0ng commit s\u1ebd kh\u00f4ng m\u1ea5t \u0111i, c\u00f3 ngh\u0129a l\u00e0 file \u0111\u00f3 \u0111\u00e3 \u0111\u01b0\u1ee3c ph\u1ee5c h\u1ed3i v\u00e0 \u0111ang \u1edf tr\u1ea1ng th\u00e1i c\u1ea7n commit l\u1ea1i th\u00eam l\u1ea7n n\u1eefa<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00e1c b\u1ea1n mu\u1ed1n b\u1ecf commit \u0111\u00f3 ra th\u00ec h\u00e3y s\u1eed d\u1ee5ng reset \u0111\u1ec3 ph\u1ee5c h\u1ed3i nh\u00e9<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">V\u00ed d\u1ee5, b\u1ea1n l\u1ee1 commit 3 l\u1ea7n, 2 l\u1ea7n tr\u01b0\u1edbc \u0111\u00f3 l\u00e0 c\u00e1c commit b\u1ea1n kh\u00f4ng mu\u1ed1n push l\u00ean th\u00ec h\u00e3y l\u00e0m nh\u01b0 th\u1ebf n\u00e0y: <code>$ git reset --soft HEAD~2<\/code><\/span><\/li>\n<\/ul>\n<h2>L\u1ef1a ch\u1ecdn ph\u00f9 h\u1ee3p gi\u1eefa merge v\u00e0 rebase<\/h2>\n<p><span style=\"font-weight: 400;\">C\u1ea3 2 l\u1ec7nh n\u00e0y \u0111\u1ec1u c\u00f3 m\u1ed9t m\u1ee5c \u0111\u00edch chung l\u00e0 k\u1ebft h\u1ee3p source t\u1eeb c\u00e1c branch kh\u00e1c nhau v\u00e0o m\u1ed9t branch<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00e1i kh\u00e1c nhau \u1edf 2 l\u1ec7nh n\u00e0y l\u00e0 m\u1ee5c v\u1ec1 m\u1ee5c \u0111\u00edch b\u1ea1n mu\u1ed1n gi\u1eef l\u1ecbch s\u1eed commit \u1edf d\u1ea1ng n\u00e0o: h\u00ecnh x\u01b0\u01a1ng c\u00e1\u00a0 hay h\u00ecnh m\u1ea1ch \u0111i\u1ec7n<\/span><\/p>\n<p>B\u00ean d\u01b0\u1edbi l\u00e0 log c\u1ee7a m\u1ed9t d\u1ef1 \u00e1n khi s\u1eed d\u1ee5ng merge<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/11\/27144945\/image3.png\" alt=\"git log h\u00ecnh m\u1ea1ch \u0111i\u1ec7n\" width=\"793\" height=\"619\" class=\"size-full wp-image-3751 aligncenter\" srcset=\"https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/11\/27144945\/image3.png 793w, https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/11\/27144945\/image3-300x234.png 300w, https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/11\/27144945\/image3-768x599.png 768w\" sizes=\"auto, (max-width: 793px) 100vw, 793px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Vi\u1ec7c s\u1eed d\u1ee5ng rebase s\u1ebd gi\u00fap b\u1ea1n xem log d\u1ec5 d\u00e0ng h\u01a1n nh\u01b0ng b\u00f9 l\u1ea1i l\u00e0 vi\u1ec7c thao t\u00e1c s\u1ebd ph\u1ee9c t\u1ea1p h\u01a1n v\u00e0 d\u1ec5 g\u00e2y ra l\u1ed7i m\u1ea5t code khi member c\u1ee7a team b\u1ea1n kh\u00f4ng thao t\u00e1c thu\u1ea7n th\u1ee5c, v\u00ec khi th\u1ef1c hi\u1ec7n rebase, n\u1ebfu c\u00f3 conflict x\u1ea3y ra th\u00ec vi\u1ec7c x\u1eed l\u00fd s\u1ebd ph\u1ee9c t\u1ea1p h\u01a1n merge nhi\u1ec1u.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">N\u1ebfu c\u00e1c b\u1ea1n mu\u1ed1n s\u1eed d\u1ee5ng rebase cho d\u1ef1 \u00e1n \u0111\u1ec3 qu\u1ea3n l\u00fd log \u0111\u01a1n gi\u1ea3n h\u01a1n th\u00ec h\u00e3y ch\u00fa \u00fd t\u1edbi m\u1ed9t TIP: squash commit<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00f3 1 v\u00e0i c\u00e1ch \u0111\u1ec3 squash commit, s\u1eed d\u1ee5ng <code>$ git rebase -i &lt;commit \u0111\u1ea7u c\u1ee7a branch&gt;<\/code> ho\u1eb7c <code>$ git reset --soft &lt;commit \u0111\u1ea7u c\u1ee7a branch&gt;<\/code>. v\u00ec m\u1ee5c \u0111\u00edch l\u00e0 qu\u1ea3n l\u00fd log d\u1ec5 d\u00e0ng n\u00ean squash s\u1ebd gi\u00fap b\u1ea1n gom c\u00e1c commit l\u1ea1i th\u00e0nh 1, m\u1ed7i khi rebase 1 branch v\u00e0o main th\u00ec t\u01b0\u01a1ng \u1ee9ng l\u00e0 1 commit<\/span><\/p>\n<p>D\u01b0\u1edbi \u0111\u00e2y l\u00e0 h\u00ecnh \u1ea3nh m\u00f4 t\u1ea3 v\u00ec sao vi\u1ec7c rebase s\u1ebd gi\u00fap b\u1ea1n xem log d\u1ec5 d\u00e0ng h\u01a1n, v\u00e0 n\u1ebfu s\u1eed d\u1ee5ng rebase k\u00e8m v\u1edbi squash commit th\u00ec log s\u1ebd \u0111\u1eb9p \u0111\u1ebfn m\u1ee9c n\u00e0o<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/11\/27145017\/image1-880x1024.png\" alt=\"log \u1edf rebase ki\u1ebfn th\u1ee9c\" width=\"880\" height=\"1024\" class=\"aligncenter wp-image-3752 size-large\" srcset=\"https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/11\/27145017\/image1-880x1024.png 880w, https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/11\/27145017\/image1-258x300.png 258w, https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/11\/27145017\/image1-768x894.png 768w, https:\/\/mevn-public.s3-ap-southeast-1.amazonaws.com\/marketenterprise.vn\/wp-images\/2023\/11\/27145017\/image1.png 1242w\" sizes=\"auto, (max-width: 880px) 100vw, 880px\" \/><\/p>\n<h2>K\u1ebft lu\u1eadn<\/h2>\n<p>Vi\u1ec7c c\u00e1c b\u1ea1n hi\u1ec3u r\u00f5 h\u01a1n c\u00e1ch th\u1ee9c l\u01b0u tr\u1eef c\u1ee7a GIT, \u00fd ngh\u0129a c\u1ee7a t\u1eebng c\u00e2u l\u1ec7nh s\u1ebd gi\u00fap b\u1ea1n thao t\u00e1c d\u1ec5 d\u00e0ng h\u01a1n c\u0169ng nh\u01b0 s\u1ebd b\u1edbt \u0111i c\u00e1c c\u00e2u h\u1ecfi: T\u1ea1i sao kh\u00f4ng th\u1ea5y source code m\u1edbi? L\u00e0m g\u00ec \u0111\u1ec3 ph\u1ee5c h\u1ed3i l\u1ea1i file \u0111\u00e3 l\u1ee1 add ho\u1eb7c commit?&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GIT &#8211; nh\u1eefng ki\u1ebfn th\u1ee9c c\u01a1 b\u1ea3n c\u1ea7n n\u1eafm \u0111\u1ec3 hi\u1ec3u r\u00f5 h\u01a1n v\u1ec1 ho\u1ea1t \u0111\u1ed9ng c\u1ee7a c\u00e1c l\u1ec7nh m\u00e0 b\u1ea1n h\u1eb1ng ng\u00e0y v\u1eabn s\u1eed d\u1ee5ng<\/p>\n","protected":false},"author":8,"featured_media":3753,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[46],"class_list":["post-3749","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-git"],"_links":{"self":[{"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/posts\/3749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/comments?post=3749"}],"version-history":[{"count":0,"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/posts\/3749\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/media\/3753"}],"wp:attachment":[{"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/media?parent=3749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/categories?post=3749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.marketenterprise.vn\/blog\/wp-json\/wp\/v2\/tags?post=3749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}