{"id":85362,"date":"2025-03-31T16:00:45","date_gmt":"2025-03-31T09:00:45","guid":{"rendered":"https:\/\/itviecblog.uptech.vn\/?p=85362"},"modified":"2025-06-17T09:02:14","modified_gmt":"2025-06-17T02:02:14","slug":"git-shell-la-gi","status":"publish","type":"post","link":"https:\/\/itviec.com\/blog\/git-shell-la-gi\/","title":{"rendered":"Git Shell: Chi ti\u1ebft c\u00e1ch s\u1eed d\u1ee5ng Git trong m\u00f4i tr\u01b0\u1eddng d\u00f2ng l\u1ec7nh"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">N\u1ed9i dung b\u00e0i vi\u1ebft<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/itviec.com\/blog\/git-shell-la-gi\/#Git_Shell_la_gi\" >Git Shell l\u00e0 g\u00ec?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/itviec.com\/blog\/git-shell-la-gi\/#Cach_cai_dat_Git_Shell_tren_Windows\" >C\u00e1ch c\u00e0i \u0111\u1eb7t Git Shell tr\u00ean Windows<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/itviec.com\/blog\/git-shell-la-gi\/#Cac_lenh_Git_shell_co_ban\" >C\u00e1c l\u1ec7nh Git shell c\u01a1 b\u1ea3n<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/itviec.com\/blog\/git-shell-la-gi\/#Mot_so_loi_thuong_gap_khi_dung_Git_Shell\" >M\u1ed9t s\u1ed1 l\u1ed7i th\u01b0\u1eddng g\u1eb7p khi d\u00f9ng Git Shell<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/itviec.com\/blog\/git-shell-la-gi\/#Cau_hoi_thuong_gap_ve_Git_shell\" >C\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 Git shell<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/itviec.com\/blog\/git-shell-la-gi\/#Tong_ket\" >T\u1ed5ng k\u1ebft<\/a><\/li><\/ul><\/nav><\/div>\n<p><em><strong>Git l\u00e0 m\u1ed9t h\u1ec7 th\u1ed1ng qu\u1ea3n l\u00fd phi\u00ean b\u1ea3n ph\u00e2n t\u00e1n m\u1ea1nh m\u1ebd v\u00e0 ph\u1ed5 bi\u1ebfn. M\u1eb7c d\u00f9 c\u00f3 nhi\u1ec1u c\u00f4ng c\u1ee5 \u0111\u1ed3 h\u1ecda \u0111\u1ec3 l\u00e0m vi\u1ec7c v\u1edbi Git, nh\u01b0ng s\u1eed d\u1ee5ng Git th\u00f4ng qua d\u00f2ng l\u1ec7nh (command line) mang l\u1ea1i s\u1ef1 linh ho\u1ea1t v\u00e0 ki\u1ec3m so\u00e1t t\u1ed1i \u0111a. \u0110\u1ec3 s\u1eed d\u1ee5ng Git, tr\u01b0\u1edbc ti\u00ean b\u1ea1n c\u1ea7n t\u00ecm hi\u1ec3u Git Shell l\u00e0 g\u00ec, c\u00e1ch c\u00e0i \u0111\u1eb7t, s\u1eed d\u1ee5ng c\u00e1c l\u1ec7nh Git c\u01a1 b\u1ea3n v\u00e0 kh\u1eafc ph\u1ee5c l\u1ed7i th\u01b0\u1eddng g\u1eb7p.<\/strong><\/em><\/p>\n<p><span style=\"font-weight: 400;\">\u0110\u1ecdc b\u00e0i vi\u1ebft n\u00e0y \u0111\u1ec3 hi\u1ec3u r\u00f5 h\u01a1n v\u1ec1:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Git shell l\u00e0 g\u00ec?<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1ch c\u00e0i \u0111\u1eb7t git shell<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">M\u1ed9t s\u1ed1 l\u1ec7nh c\u01a1 b\u1ea3n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">M\u1ed9t s\u1ed1 l\u1ed7i th\u01b0\u1eddng g\u1eb7p<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Git_Shell_la_gi\"><\/span><b>Git Shell l\u00e0 g\u00ec?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Shell l\u00e0 m\u1ed9t ch\u01b0\u01a1ng tr\u00ecnh ph\u1ea7n m\u1ec1m gi\u00fap ng\u01b0\u1eddi d\u00f9ng t\u01b0\u01a1ng t\u00e1c v\u1edbi h\u1ec7 \u0111i\u1ec1u h\u00e0nh th\u00f4ng qua giao di\u1ec7n d\u00f2ng l\u1ec7nh. Shell cho ph\u00e9p ng\u01b0\u1eddi d\u00f9ng th\u1ef1c hi\u1ec7n c\u00e1c thao t\u00e1c qu\u1ea3n l\u00fd h\u1ec7 th\u1ed1ng, c\u00e0i \u0111\u1eb7t ph\u1ea7n m\u1ec1m v\u00e0 x\u1eed l\u00fd c\u00e1c t\u1ec7p d\u1eef li\u1ec7u b\u1eb1ng c\u00e1ch nh\u1eadp c\u00e1c l\u1ec7nh v\u00e0o giao di\u1ec7n d\u00f2ng l\u1ec7nh, \u0111\u1ed3ng th\u1eddi hi\u1ec3n th\u1ecb k\u1ebft qu\u1ea3 cho ng\u01b0\u1eddi d\u00f9ng. C\u00e1c shell ph\u1ed5 bi\u1ebfn bao g\u1ed3m Bash (tr\u00ean Linux\/Unix), Command Prompt (tr\u00ean Windows) v\u00e0 Zsh.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Git Shell l\u00e0 m\u1ed9t m\u00f4i tr\u01b0\u1eddng d\u00f2ng l\u1ec7nh \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 t\u01b0\u01a1ng t\u00e1c v\u1edbi Git. Git Shell cung c\u1ea5p m\u1ed9t giao di\u1ec7n d\u00f2ng l\u1ec7nh (CLI) cho ph\u00e9p ng\u01b0\u1eddi d\u00f9ng th\u1ef1c hi\u1ec7n c\u00e1c thao t\u00e1c nh\u01b0 commit, push, pull, clone v\u00e0 qu\u1ea3n l\u00fd kho Git t\u1eeb xa.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Ngo\u00e0i ra, Git Shell c\u00f2n h\u1ed7 tr\u1ee3 c\u00e1c c\u00e2u l\u1ec7nh Unix v\u00e0 Windows, gi\u00fap ng\u01b0\u1eddi d\u00f9ng d\u1ec5 d\u00e0ng t\u00edch h\u1ee3p v\u00e0 s\u1eed d\u1ee5ng Git trong c\u00e1c d\u1ef1 \u00e1n ph\u1ea7n m\u1ec1m. N\u00f3 c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 thay th\u1ebf c\u00e1c giao di\u1ec7n \u0111\u1ed3 h\u1ecda nh\u01b0 Git GUI ho\u1eb7c c\u00e1c c\u00f4ng c\u1ee5 kh\u00e1c, gi\u00fap l\u00e0m vi\u1ec7c tr\u1ef1c ti\u1ebfp v\u1edbi kho Git nhanh ch\u00f3ng v\u00e0 hi\u1ec7u qu\u1ea3 h\u01a1n.<\/span><\/p>\n<blockquote><p><em>\u0110\u1ecdc th\u00eam: <a href=\"\/blog\/git-bash-shell-la-gi\/\" target=\"_blank\" rel=\"noopener\"><strong>Git Bash Shell: H\u01b0\u1edbng d\u1eabn s\u1eed d\u1ee5ng Git Bash hi\u1ec7u qu\u1ea3 A-Z<\/strong><\/a><\/em><\/p><\/blockquote>\n<h2><span class=\"ez-toc-section\" id=\"Cach_cai_dat_Git_Shell_tren_Windows\"><\/span><b>C\u00e1ch c\u00e0i \u0111\u1eb7t Git Shell tr\u00ean Windows<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>B\u01b0\u1edbc 1: C\u00e0i git<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Truy c\u1eadp trang web ch\u00ednh th\u1ee9c <\/span><a href=\"https:\/\/git-scm.com\/book\/en\/v2\/Getting-Started-Installing-Git\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Git SCM<\/span><\/a><span style=\"font-weight: 400;\">, v\u00e0 l\u00e0m theo h\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t t\u01b0\u01a1ng \u1ee9ng cho t\u1eebng n\u1ec1n t\u1ea3ng Windows, macOS v\u00e0 Linux:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Windows<\/b><span style=\"font-weight: 400;\">: T\u1ea3i v\u00e0 ch\u1ea1y t\u1ec7p c\u00e0i \u0111\u1eb7t.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>MacOS<\/b><span style=\"font-weight: 400;\">: T\u1ea3i v\u00e0 l\u00e0m theo h\u01b0\u1edbng d\u1eabn.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Linux<\/b><span style=\"font-weight: 400;\">: C\u00e0i \u0111\u1eb7t th\u00f4ng qua c\u00e1c c\u00f4ng c\u1ee5 qu\u1ea3n l\u00fd g\u00f3i nh\u01b0 <\/span><span style=\"font-weight: 400;\">apt<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">dnf<\/span><span style=\"font-weight: 400;\"> ho\u1eb7c <\/span><span style=\"font-weight: 400;\">yum<\/span><span style=\"font-weight: 400;\">, t\u00f9y thu\u1ed9c v\u00e0o b\u1ea3n ph\u00e2n ph\u1ed1i m\u00e0 b\u1ea1n \u0111ang s\u1eed d\u1ee5ng.<\/span><\/li>\n<\/ul>\n<h3><b>B\u01b0\u1edbc 2: T\u00f9y ch\u1ecdn c\u1ea5u h\u00ecnh \u0111\u01b0\u1ee3c khuy\u1ebfn ngh\u1ecb tr\u00ean Windows<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Khi m\u1edf tr\u00ecnh c\u00e0i \u0111\u1eb7t Git tr\u00ean Windows, b\u1ea1n s\u1ebd th\u1ea5y m\u1ed9t s\u1ed1 t\u00f9y ch\u1ecdn c\u1ea5u h\u00ecnh. C\u00e1c l\u1ef1a ch\u1ecdn sau \u0111\u00e2y \u0111\u01b0\u1ee3c khuy\u1ebfn ngh\u1ecb:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Ch\u1ec9nh s\u1eeda PATH<\/b><span style=\"font-weight: 400;\">: Ch\u1ecdn <\/span><b>\u201cUse Git Bash only\u201d<\/b><span style=\"font-weight: 400;\"> \u0111\u1ec3 s\u1eed d\u1ee5ng m\u1ed9t PATH kh\u00f4ng b\u1ecb thay \u0111\u1ed5i, gi\u00fap Git Bash ho\u1ea1t \u0111\u1ed9ng m\u1ed9t c\u00e1ch \u0111\u1ed9c l\u1eadp v\u00e0 kh\u00f4ng \u1ea3nh h\u01b0\u1edfng \u0111\u1ebfn c\u00e1c \u1ee9ng d\u1ee5ng kh\u00e1c trong h\u1ec7 th\u1ed1ng.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>C\u1ea5u h\u00ecnh Line Ending<\/b><span style=\"font-weight: 400;\">: Ch\u1ecdn <\/span><b>\u201cCheckout Windows-style, commit Unix-style line endings\u201d<\/b><span style=\"font-weight: 400;\"> \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o s\u1ef1 t\u01b0\u01a1ng th\u00edch gi\u1eefa c\u00e1c h\u1ec7 \u0111i\u1ec1u h\u00e0nh kh\u00e1c nhau.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>T\u1ea1o Shortcut tr\u00ean Desktop<\/b><span style=\"font-weight: 400;\">: Ch\u1ecdn <\/span><b>\u201cCreate a desktop shortcut\u201d<\/b><span style=\"font-weight: 400;\"> \u0111\u1ec3 d\u1ec5 d\u00e0ng truy c\u1eadp Git Bash sau n\u00e0y.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>SSH Client:<\/b><span style=\"font-weight: 400;\"> S\u1eed d\u1ee5ng OpenSSH n\u1ebfu ng\u01b0\u1eddi d\u00f9ng c\u1ea7n l\u00e0m vi\u1ec7c v\u1edbi kho l\u01b0u tr\u1eef t\u1eeb xa qua SSH<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">V\u1edbi t\u1ea5t c\u1ea3 c\u00e1c c\u00e0i \u0111\u1eb7t c\u00f2n l\u1ea1i, b\u1ea1n c\u00f3 th\u1ec3 gi\u1eef nguy\u00ean t\u00f9y ch\u1ecdn m\u1eb7c \u0111\u1ecbnh.<\/span><\/p>\n<h3><b>B\u01b0\u1edbc 3: Sau khi c\u00e0i \u0111\u1eb7t Git<\/b><\/h3>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Sau khi c\u00e0i \u0111\u1eb7t, b\u1ea1n c\u00f3 th\u1ec3 m\u1edf Git Bash (tr\u00ean Windows) ho\u1eb7c Terminal (tr\u00ean macOS) \u0111\u1ec3 s\u1eed d\u1ee5ng Git. C\u00f3 th\u1ec3 ch\u1ea1y th\u1eed l\u1ec7nh sau \u0111\u1ec3 ki\u1ec3m tra xem \u0111\u00e3 c\u00e0i \u0111\u1eb7t th\u00e0nh c\u00f4ng hay ch\u01b0a. L\u1ec7nh n\u00e0y s\u1ebd in ra version c\u1ee7a Git n\u1ebfu b\u1ea1n \u0111\u00e3 c\u00e0i \u0111\u1eb7t th\u00e0nh c\u00f4ng.<\/span><\/li>\n<\/ul>\n<pre>git --version<\/pre>\n<h3><b>B\u01b0\u1edbc 4: C\u1ea5u h\u00ecnh Git sau khi c\u00e0i \u0111\u1eb7t<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 c\u1ea5u h\u00ecnh th\u00f4ng tin ng\u01b0\u1eddi d\u00f9ng cho Git, m\u1edf Git Bash ho\u1eb7c Terminal v\u00e0 s\u1eed d\u1ee5ng c\u00e1c l\u1ec7nh sau:<\/span><\/p>\n<pre>git config --global user.name \"T\u00ean c\u1ee7a b\u1ea1n\"\ngit config --global user.email \"Email c\u1ee7a b\u1ea1n\"<\/pre>\n<p><span style=\"font-weight: 400;\">\u0110\u1ea3m b\u1ea3o email b\u1ea1n nh\u1eadp tr\u00f9ng v\u1edbi email b\u1ea1n \u0111\u00e3 \u0111\u0103ng k\u00fd tr\u00ean GitHub \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o s\u1ef1 \u0111\u1ed3ng b\u1ed9. Sau khi c\u1ea5u h\u00ecnh, b\u1ea1n c\u00f3 th\u1ec3 ki\u1ec3m tra l\u1ea1i th\u00f4ng tin b\u1eb1ng l\u1ec7nh:<\/span><\/p>\n<p>git config &#8211;list<\/p>\n<h4><span style=\"font-weight: 400;\">Ngo\u00e0i ra c\u00f2n m\u1ed9t s\u1ed1 c\u1ea5u h\u00ecnh Git m\u00e0 b\u1ea1n n\u00ean bi\u1ebft nh\u01b0:<\/span><\/h4>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp editor m\u1eb7c \u0111\u1ecbnh:<\/span><\/li>\n<\/ul>\n<pre>git config --global core.editor \"notepad\"<\/pre>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">L\u01b0u th\u00f4ng tin \u0111\u0103ng nh\u1eadp \u0111\u1ec3 kh\u00f4ng ph\u1ea3i nh\u1eadp m\u1eadt kh\u1ea9u m\u1ed7i l\u1ea7n:<\/span><\/li>\n<\/ul>\n<pre>git config --global credential.helper store<\/pre>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u1ea5u h\u00ecnh nh\u00e1nh m\u1eb7c \u0111\u1ecbnh l\u00e0 &#8220;main&#8221; thay v\u00ec &#8220;master&#8221;:<\/span><\/li>\n<\/ul>\n<pre>git config --global init.defaultBranch main<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Cac_lenh_Git_shell_co_ban\"><\/span><b>C\u00e1c l\u1ec7nh Git shell c\u01a1 b\u1ea3n<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>1. Kh\u1edfi t\u1ea1o m\u1ed9t Git Repository<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Repository l\u00e0 n\u01a1i Git l\u01b0u tr\u1eef t\u1ea5t c\u1ea3 c\u00e1c thay \u0111\u1ed5i c\u1ee7a d\u1ef1 \u00e1n, bao g\u1ed3m l\u1ecbch s\u1eed commit v\u00e0 c\u00e1c nh\u00e1nh. \u0110\u1ec3 b\u1eaft \u0111\u1ea7u s\u1eed d\u1ee5ng Git trong th\u01b0 m\u1ee5c d\u1ef1 \u00e1n, b\u1ea1n c\u1ea7n kh\u1edfi t\u1ea1o m\u1ed9t repository m\u1edbi b\u1eb1ng l\u1ec7nh:<\/span><\/p>\n<pre>git init<\/pre>\n<h3><b>2. Th\u00eam c\u00e1c t\u1ec7p v\u00e0o Staging Area<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Staging area l\u00e0 n\u01a1i t\u1ea1m th\u1eddi ch\u1ee9a c\u00e1c thay \u0111\u1ed5i \u0111\u00e3 \u0111\u01b0\u1ee3c ch\u1ecdn tr\u01b0\u1edbc khi \u0111\u01b0\u1ee3c commit v\u00e0o repository ch\u00ednh th\u1ee9c. \u0110\u1ec3 th\u00eam t\u1ec7p c\u1ee5 th\u1ec3 v\u00e0o staging area, ta s\u1eed d\u1ee5ng l\u1ec7nh:<\/span><\/p>\n<pre># Th\u00eam 1 t\u1ec7p c\u1ee5 th\u1ec3 v\u00e0o staging area\ngit add &lt;file_name&gt;\n# Th\u00eam t\u1ea5t c\u1ea3 c\u00e1c thay \u0111\u1ed5i trong th\u01b0 m\u1ee5c hi\u1ec7n t\u1ea1i\ngit add .<\/pre>\n<h3><b>3. Commit\u00a0<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Commit l\u00e0 h\u00e0nh \u0111\u1ed9ng ghi l\u1ea1i c\u00e1c thay \u0111\u1ed5i t\u1eeb staging area v\u00e0o l\u1ecbch s\u1eed d\u1ef1 \u00e1n, m\u1ed7i commit c\u00f3 m\u1ed9t m\u00e3 ID duy nh\u1ea5t. Sau khi th\u00eam t\u1ec7p v\u00e0o staging area, b\u1ea1n c\u1ea7n commit c\u00e1c thay \u0111\u1ed5i n\u00e0y v\u00e0o Git v\u1edbi m\u1ed9t th\u00f4ng \u0111i\u1ec7p m\u00f4 t\u1ea3 c\u00e1c thay \u0111\u1ed5i \u0111\u00f3:<\/span><\/p>\n<pre>git commit -m \"commit message\"<\/pre>\n<h3><b>4. Xem l\u1ecbch s\u1eed commit<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 xem l\u1ea1i c\u00e1c commit \u0111\u00e3 th\u1ef1c hi\u1ec7n trong kho Git, ta s\u1eed d\u1ee5ng l\u1ec7nh:<\/span><\/p>\n<pre>git log<\/pre>\n<h3><b>5. T\u1ea1o nh\u00e1nh m\u1edbi<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 t\u1ea1o m\u1ed9t nh\u00e1nh (branch) m\u1edbi trong kho Git, s\u1eed d\u1ee5ng l\u1ec7nh:<\/span><\/p>\n<pre>git branch &lt;branch_name&gt;<\/pre>\n<h3><b>6. Chuy\u1ec3n \u0111\u1ed5i gi\u1eefa c\u00e1c nh\u00e1nh<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Khi mu\u1ed1n chuy\u1ec3n sang l\u00e0m vi\u1ec7c tr\u00ean m\u1ed9t nh\u00e1nh kh\u00e1c, ta d\u00f9ng l\u1ec7nh:<\/span><\/p>\n<pre>git checkout &lt;branch_name&gt;<\/pre>\n<h3><b>7. G\u1ed9p c\u00e1c nh\u00e1nh<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 merge (g\u1ed9p) c\u00e1c thay \u0111\u1ed5i t\u1eeb m\u1ed9t nh\u00e1nh kh\u00e1c v\u00e0o nh\u00e1nh hi\u1ec7n t\u1ea1i, s\u1eed d\u1ee5ng l\u1ec7nh:<\/span><\/p>\n<pre>git merge &lt;branch_name&gt;<\/pre>\n<h3><b>8. \u0110\u1ea9y thay \u0111\u1ed5i l\u00ean kho t\u1eeb xa (Remote Repository)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 \u0111\u1ea9y c\u00e1c thay \u0111\u1ed5i c\u1ee7a b\u1ea1n l\u00ean kho Git t\u1eeb xa (nh\u01b0 tr\u00ean GitHub ho\u1eb7c GitLab), s\u1eed d\u1ee5ng l\u1ec7nh:<\/span><\/p>\n<pre>git push &lt;remote_name&gt; &lt;branch_name&gt;<\/pre>\n<h3><b>9. L\u1ea5y c\u00e1c thay \u0111\u1ed5i t\u1eeb xa<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">N\u1ebfu b\u1ea1n mu\u1ed1n t\u1ea3i v\u1ec1 v\u00e0 t\u00edch h\u1ee3p c\u00e1c thay \u0111\u1ed5i m\u1edbi nh\u1ea5t t\u1eeb kho Git t\u1eeb xa v\u00e0o nh\u00e1nh hi\u1ec7n t\u1ea1i, s\u1eed d\u1ee5ng l\u1ec7nh:<\/span><\/p>\n<pre>git pull &lt;remote_name&gt; &lt;branch_name&gt;<\/pre>\n<h3><b>10. Ki\u1ec3m tra tr\u1ea1ng th\u00e1i hi\u1ec7n t\u1ea1i c\u1ee7a kho Git<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 ki\u1ec3m tra tr\u1ea1ng th\u00e1i kho Git, xem t\u1ec7p n\u00e0o \u0111\u00e3 \u0111\u01b0\u1ee3c thay \u0111\u1ed5i ho\u1eb7c \u0111ang \u1edf trong staging area, s\u1eed d\u1ee5ng l\u1ec7nh:<\/span><\/p>\n<pre>git status<\/pre>\n<h3><b>11. L\u1ec7nh git clone<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">L\u1ec7nh \u0111\u1ec3 sao ch\u00e9p kho l\u01b0u tr\u1eef t\u1eeb xa:<\/span><\/p>\n<pre>git clone &lt;repository_url&gt;<\/pre>\n<h3><b>12. L\u1ec7nh git fetch<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">L\u1ec7nh l\u1ea5y th\u00f4ng tin t\u1eeb kho t\u1eeb xa m\u00e0 kh\u00f4ng merge:<\/span><\/p>\n<pre>git fetch &lt;remote_name&gt;<\/pre>\n<h3><b>13. L\u1ec7nh git stash<\/b><\/h3>\n<pre><span style=\"font-weight: 400;\">L\u1ec7nh l\u01b0u tr\u1eef t\u1ea1m th\u1eddi thay \u0111\u1ed5i:<\/span><span style=\"font-weight: 400;\">\ngit stash\u00a0\ngit stash pop<\/span><\/pre>\n<blockquote><p><em>\u0110\u1ecdc th\u00eam: <a href=\"\/blog\/cac-lenh-git-co-ban\/\" target=\"_blank\" rel=\"noopener\"><strong>T\u1ed5ng h\u1ee3p 20+ c\u00e1c l\u1ec7nh Git c\u01a1 b\u1ea3n c\u1ea7n bi\u1ebft<\/strong><\/a><\/em><\/p><\/blockquote>\n<h2><span class=\"ez-toc-section\" id=\"Mot_so_loi_thuong_gap_khi_dung_Git_Shell\"><\/span><b>M\u1ed9t s\u1ed1 l\u1ed7i th\u01b0\u1eddng g\u1eb7p khi d\u00f9ng Git Shell<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><strong>&#8220;fatal: not a git repository&#8221;<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">L\u1ed7i n\u00e0y xu\u1ea5t hi\u1ec7n khi b\u1ea1n ch\u1ea1y c\u00e1c l\u1ec7nh Git trong m\u1ed9t th\u01b0 m\u1ee5c kh\u00f4ng ph\u1ea3i l\u00e0 m\u1ed9t Git repository.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00e1ch kh\u1eafc ph\u1ee5c:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0110\u1ea3m b\u1ea3o r\u1eb1ng b\u1ea1n \u0111ang \u1edf trong th\u01b0 m\u1ee5c ch\u1ee9a kho Git (th\u01b0 m\u1ee5c c\u00f3 th\u01b0 m\u1ee5c con <\/span><span style=\"font-weight: 400;\">.git<\/span><span style=\"font-weight: 400;\">).<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Ho\u1eb7c ch\u1ea1y l\u1ec7nh <\/span><span style=\"font-weight: 400;\">git init<\/span><span style=\"font-weight: 400;\"> \u0111\u1ec3 kh\u1edfi t\u1ea1o m\u1ed9t repository m\u1edbi.<\/span><\/li>\n<\/ul>\n<h3><strong>&#8220;error: failed to push some refs&#8221;<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">L\u1ed7i n\u00e0y x\u1ea3y ra khi b\u1ea1n c\u1ed1 g\u1eafng \u0111\u1ea9y (push) c\u00e1c thay \u0111\u1ed5i l\u00ean kho t\u1eeb xa, nh\u01b0ng c\u00f3 s\u1ef1 kh\u00e1c bi\u1ec7t gi\u1eefa kho Git local v\u00e0 kho t\u1eeb xa. \u0110i\u1ec1u n\u00e0y th\u01b0\u1eddng x\u1ea3y ra khi c\u00f3 c\u00e1c thay \u0111\u1ed5i m\u1edbi tr\u00ean kho t\u1eeb xa m\u00e0 b\u1ea1n ch\u01b0a t\u1ea3i v\u1ec1 (pull).\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00e1ch kh\u1eafc ph\u1ee5c:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Ch\u1ea1y l\u1ec7nh <\/span><span style=\"font-weight: 400;\">git pull<\/span><span style=\"font-weight: 400;\"> \u0111\u1ec3 t\u1ea3i c\u00e1c thay \u0111\u1ed5i m\u1edbi t\u1eeb kho t\u1eeb xa v\u1ec1.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Gi\u1ea3i quy\u1ebft xung \u0111\u1ed9t (n\u1ebfu c\u00f3), r\u1ed3i th\u1eed l\u1ea1i l\u1ec7nh <\/span><span style=\"font-weight: 400;\">git push<\/span><span style=\"font-weight: 400;\">.<\/span><\/li>\n<\/ul>\n<h3><strong>&#8220;Merge conflict&#8221;<\/strong><\/h3>\n<p><span style=\"font-weight: 400;\">Khi c\u00f3 hai ho\u1eb7c nhi\u1ec1u ng\u01b0\u1eddi c\u00f9ng thay \u0111\u1ed5i c\u00f9ng m\u1ed9t t\u1ec7p \u1edf c\u00e1c nh\u00e1nh kh\u00e1c nhau, Git s\u1ebd kh\u00f4ng t\u1ef1 \u0111\u1ed9ng h\u1ee3p nh\u1ea5t ch\u00fang v\u00e0 y\u00eau c\u1ea7u b\u1ea1n gi\u1ea3i quy\u1ebft xung \u0111\u1ed9t (merge conflict).\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00e1ch kh\u1eafc ph\u1ee5c:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">M\u1edf c\u00e1c t\u1ec7p b\u1ecb xung \u0111\u1ed9t v\u00e0 ch\u1ec9nh s\u1eeda \u0111\u1ec3 h\u1ee3p nh\u1ea5t c\u00e1c thay \u0111\u1ed5i.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">D\u00f9ng l\u1ec7nh <\/span><span style=\"font-weight: 400;\">git add &lt;file_name&gt;<\/span><span style=\"font-weight: 400;\"> v\u00e0 <\/span><span style=\"font-weight: 400;\">git merge \u2014continue <\/span><span style=\"font-weight: 400;\">\u0111\u1ec3 ho\u00e0n t\u1ea5t.<\/span><\/li>\n<\/ul>\n<h3><strong>&#8220;Permission denied&#8221; <\/strong><b>(Public key)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">L\u1ed7i n\u00e0y x\u1ea3y ra khi Git kh\u00f4ng th\u1ec3 k\u1ebft n\u1ed1i v\u1edbi kho t\u1eeb xa do v\u1ea5n \u0111\u1ec1 v\u1edbi SSH keys.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00e1ch kh\u1eafc ph\u1ee5c:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0110\u1ea3m b\u1ea3o \u0111\u00e3 thi\u1ebft l\u1eadp SSH keys \u0111\u00fang c\u00e1ch v\u00e0 th\u00eam ch\u00fang v\u00e0o t\u00e0i kho\u1ea3n GitHub ho\u1eb7c GitLab c\u1ee7a m\u00ecnh.\u00a0<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">V\u00ed d\u1ee5 v\u1edbi github b\u1ea1n c\u00f3 th\u1ec3 ki\u1ec3m tra c\u1ea5u h\u00ecnh SSH b\u1eb1ng l\u1ec7nh:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">ssh -T git@github.com<\/span><span style=\"font-weight: 400;\">.<\/span><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Cau_hoi_thuong_gap_ve_Git_shell\"><\/span><b>C\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 Git shell<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>Ph\u00e2n bi\u1ec7t Bash v\u00e0 Shell?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Shell l\u00e0 m\u1ed9t giao di\u1ec7n d\u00f2ng l\u1ec7nh cho ph\u00e9p ng\u01b0\u1eddi d\u00f9ng t\u01b0\u01a1ng t\u00e1c v\u1edbi h\u1ec7 \u0111i\u1ec1u h\u00e0nh th\u00f4ng qua c\u00e1c l\u1ec7nh. Shell cung c\u1ea5p m\u1ed9t m\u00f4i tr\u01b0\u1eddng \u0111\u1ec3 th\u1ef1c thi c\u00e1c c\u00e2u l\u1ec7nh v\u00e0 qu\u1ea3n l\u00fd c\u00e1c t\u00e1c v\u1ee5 h\u1ec7 th\u1ed1ng.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00f2n bash (Bourne Again Shell) l\u00e0 m\u1ed9t lo\u1ea1i shell ph\u1ed5 bi\u1ebfn, \u0111\u1eb7c bi\u1ec7t tr\u00ean c\u00e1c h\u1ec7 \u0111i\u1ec1u h\u00e0nh Unix-like nh\u01b0 Linux v\u00e0 macOS. Bash cung c\u1ea5p nhi\u1ec1u t\u00ednh n\u0103ng m\u1edf r\u1ed9ng, ch\u1eb3ng h\u1ea1n nh\u01b0 scripting, t\u1ef1 \u0111\u1ed9ng ho\u00e0n th\u00e0nh l\u1ec7nh v\u00e0 qu\u1ea3n l\u00fd bi\u1ebfn m\u00f4i tr\u01b0\u1eddng, gi\u00fap ng\u01b0\u1eddi d\u00f9ng l\u00e0m vi\u1ec7c hi\u1ec7u qu\u1ea3 h\u01a1n. Ngo\u00e0i ra c\u00f2n c\u00f3 m\u1ed9t s\u1ed1 lo\u1ea1i shell kh\u00e1c nh\u01b0 Zsh, Fish, Ksh,&#8230;<\/span><\/p>\n<blockquote><p><em>\u0110\u1ecdc th\u00eam: <a href=\"\/blog\/bash-shell-la-gi\/\" target=\"_blank\" rel=\"noopener\"><strong>Bash Shell l\u00e0 g\u00ec? C\u00e1c t\u00ednh n\u0103ng ch\u00ednh c\u1ee7a Bash Shell<\/strong><\/a><\/em><\/p><\/blockquote>\n<h3><b>Ph\u00e2n bi\u1ec7t Git Shell v\u00e0 Git Bash?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Git Bash l\u00e0 m\u1ed9t c\u00f4ng c\u1ee5 d\u00f2ng l\u1ec7nh d\u00e0nh cho ng\u01b0\u1eddi d\u00f9ng Windows, cung c\u1ea5p m\u00f4i tr\u01b0\u1eddng gi\u1ed1ng nh\u01b0 Unix \u0111\u1ec3 ch\u1ea1y c\u00e1c l\u1ec7nh Git. N\u00f3 s\u1eed d\u1ee5ng bash shell, cho ph\u00e9p ng\u01b0\u1eddi d\u00f9ng ch\u1ea1y c\u00e1c l\u1ec7nh Git c\u00f9ng c\u00e1c t\u00ednh n\u0103ng shell c\u1ee7a Unix.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Trong khi \u0111\u00f3, Git Shell l\u00e0 m\u1ed9t c\u00f4ng c\u1ee5 d\u00f2ng l\u1ec7nh kh\u00e1c tr\u00ean Windows, ch\u1ec9 t\u1eadp trung v\u00e0o c\u00e1c l\u1ec7nh Git m\u00e0 kh\u00f4ng h\u1ed7 tr\u1ee3 \u0111\u1ea7y \u0111\u1ee7 c\u00e1c t\u00ednh n\u0103ng c\u1ee7a bash nh\u01b0 Git Bash. V\u00ec v\u1eady, Git Bash l\u00e0 s\u1ef1 l\u1ef1a ch\u1ecdn linh ho\u1ea1t h\u01a1n khi l\u00e0m vi\u1ec7c v\u1edbi Git tr\u00ean Windows.<\/span><\/p>\n<h3><b>L\u00e0m th\u1ebf n\u00e0o \u0111\u1ec3 m\u1edf Git Shell tr\u00ean MacOS\/Linux?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Tr\u00ean macOS\/Linux, b\u1ea1n c\u00f3 th\u1ec3 m\u1edf Git Shell th\u00f4ng qua Terminal, v\u00ec Git \u0111\u00e3 t\u00edch h\u1ee3p s\u1eb5n v\u00e0o c\u00e1c h\u1ec7 \u0111i\u1ec1u h\u00e0nh n\u00e0y. Ch\u1ec9 c\u1ea7n m\u1edf Terminal v\u00e0 g\u00f5 c\u00e1c l\u1ec7nh Git nh\u01b0 b\u00ecnh th\u01b0\u1eddng \u0111\u1ec3 b\u1eaft \u0111\u1ea7u s\u1eed d\u1ee5ng.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Tong_ket\"><\/span><b>T\u1ed5ng k\u1ebft<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Git Shell kh\u00f4ng ch\u1ec9 l\u00e0 m\u1ed9t c\u00f4ng c\u1ee5 m\u1ea1nh m\u1ebd m\u00e0 c\u00f2n l\u00e0 m\u1ed9t ph\u1ea7n quan tr\u1ecdng trong quy tr\u00ecnh l\u00e0m vi\u1ec7c c\u1ee7a c\u00e1c l\u1eadp tr\u00ecnh vi\u00ean. Vi\u1ec7c n\u1eafm \u0111\u01b0\u1ee3c c\u00e1c l\u1ec7nh c\u01a1 b\u1ea3n v\u00e0 c\u00e1c v\u1ea5n \u0111\u1ec1 c\u00f3 th\u1ec3 g\u1eb7p ph\u1ea3i khi s\u1eed d\u1ee5ng Git s\u1ebd gi\u00fap b\u1ea1n l\u00e0m vi\u1ec7c hi\u1ec7u qu\u1ea3 v\u00e0 nhanh ch\u00f3ng h\u01a1n.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">ITViec hy v\u1ecdng b\u00e0i vi\u1ebft tr\u00ean \u0111\u00e3 gi\u00fap b\u1ea1n c\u00f3 c\u00e1i nh\u00ecn t\u1ed5ng quan v\u1ec1 c\u00e1ch c\u00e0i \u0111\u1eb7t Git c\u0169ng nh\u01b0 m\u1ed9t s\u1ed1 kh\u00e1i ni\u1ec7m c\u0103n b\u1ea3n.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Git l\u00e0 m\u1ed9t h\u1ec7 th\u1ed1ng qu\u1ea3n l\u00fd phi\u00ean b\u1ea3n ph\u00e2n t\u00e1n m\u1ea1nh m\u1ebd v\u00e0 ph\u1ed5 bi\u1ebfn. M\u1eb7c d\u00f9 c\u00f3 nhi\u1ec1u c\u00f4ng c\u1ee5 \u0111\u1ed3 h\u1ecda \u0111\u1ec3 l\u00e0m vi\u1ec7c v\u1edbi Git, nh\u01b0ng s\u1eed d\u1ee5ng Git th\u00f4ng qua d\u00f2ng l\u1ec7nh (command line) mang l\u1ea1i s\u1ef1 linh ho\u1ea1t v\u00e0 ki\u1ec3m so\u00e1t t\u1ed1i \u0111a. \u0110\u1ec3 s\u1eed d\u1ee5ng Git, tr\u01b0\u1edbc ti\u00ean [&hellip;]<\/p>\n","protected":false},"author":209,"featured_media":85455,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_gspb_post_css":"","footnotes":""},"categories":[109],"tags":[],"class_list":["post-85362","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chuyen-mon-it"],"blocksy_meta":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.8 (Yoast SEO v27.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Git Shell: Chi ti\u1ebft c\u00e1ch s\u1eed d\u1ee5ng Git trong m\u00f4i tr\u01b0\u1eddng d\u00f2ng l\u1ec7nh - ITviec Blog<\/title>\n<meta name=\"description\" content=\"\u0110\u1ec3 s\u1eed d\u1ee5ng Git, tr\u01b0\u1edbc ti\u00ean b\u1ea1n c\u1ea7n t\u00ecm hi\u1ec3u Git Shell l\u00e0 g\u00ec, c\u00e1ch c\u00e0i \u0111\u1eb7t, s\u1eed d\u1ee5ng c\u00e1c l\u1ec7nh Git c\u01a1 b\u1ea3n v\u00e0 kh\u1eafc ph\u1ee5c l\u1ed7i th\u01b0\u1eddng g\u1eb7p.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itviec.com\/blog\/git-shell-la-gi\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Git Shell: Chi ti\u1ebft c\u00e1ch s\u1eed d\u1ee5ng Git trong m\u00f4i tr\u01b0\u1eddng d\u00f2ng l\u1ec7nh\" \/>\n<meta property=\"og:description\" content=\"Git l\u00e0 m\u1ed9t h\u1ec7 th\u1ed1ng qu\u1ea3n l\u00fd phi\u00ean b\u1ea3n ph\u00e2n t\u00e1n m\u1ea1nh m\u1ebd v\u00e0 ph\u1ed5 bi\u1ebfn. M\u1eb7c d\u00f9 c\u00f3 nhi\u1ec1u c\u00f4ng c\u1ee5 \u0111\u1ed3 h\u1ecda \u0111\u1ec3 l\u00e0m vi\u1ec7c v\u1edbi Git, nh\u01b0ng s\u1eed d\u1ee5ng Git th\u00f4ng qua d\u00f2ng\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itviec.com\/blog\/git-shell-la-gi\/\" \/>\n<meta property=\"og:site_name\" content=\"ITviec Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ITviec\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-31T09:00:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-17T02:02:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/03\/git-shell-vippro-scaled.png\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"337\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"M\u1ef9 Duy\u00ean\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ITviec\" \/>\n<meta name=\"twitter:site\" content=\"@ITviec\" \/>\n<meta name=\"twitter:label1\" content=\"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi\" \/>\n\t<meta name=\"twitter:data1\" content=\"M\u1ef9 Duy\u00ean\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 ph\u00fat\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Git Shell: Chi ti\u1ebft c\u00e1ch s\u1eed d\u1ee5ng Git trong m\u00f4i tr\u01b0\u1eddng d\u00f2ng l\u1ec7nh - ITviec Blog","description":"\u0110\u1ec3 s\u1eed d\u1ee5ng Git, tr\u01b0\u1edbc ti\u00ean b\u1ea1n c\u1ea7n t\u00ecm hi\u1ec3u Git Shell l\u00e0 g\u00ec, c\u00e1ch c\u00e0i \u0111\u1eb7t, s\u1eed d\u1ee5ng c\u00e1c l\u1ec7nh Git c\u01a1 b\u1ea3n v\u00e0 kh\u1eafc ph\u1ee5c l\u1ed7i th\u01b0\u1eddng g\u1eb7p.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/itviec.com\/blog\/git-shell-la-gi\/","og_locale":"vi_VN","og_type":"article","og_title":"Git Shell: Chi ti\u1ebft c\u00e1ch s\u1eed d\u1ee5ng Git trong m\u00f4i tr\u01b0\u1eddng d\u00f2ng l\u1ec7nh","og_description":"Git l\u00e0 m\u1ed9t h\u1ec7 th\u1ed1ng qu\u1ea3n l\u00fd phi\u00ean b\u1ea3n ph\u00e2n t\u00e1n m\u1ea1nh m\u1ebd v\u00e0 ph\u1ed5 bi\u1ebfn. M\u1eb7c d\u00f9 c\u00f3 nhi\u1ec1u c\u00f4ng c\u1ee5 \u0111\u1ed3 h\u1ecda \u0111\u1ec3 l\u00e0m vi\u1ec7c v\u1edbi Git, nh\u01b0ng s\u1eed d\u1ee5ng Git th\u00f4ng qua d\u00f2ng","og_url":"https:\/\/itviec.com\/blog\/git-shell-la-gi\/","og_site_name":"ITviec Blog","article_publisher":"https:\/\/www.facebook.com\/ITviec","article_published_time":"2025-03-31T09:00:45+00:00","article_modified_time":"2025-06-17T02:02:14+00:00","og_image":[{"width":640,"height":337,"url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/03\/git-shell-vippro-scaled.png","type":"image\/png"}],"author":"M\u1ef9 Duy\u00ean","twitter_card":"summary_large_image","twitter_creator":"@ITviec","twitter_site":"@ITviec","twitter_misc":{"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi":"M\u1ef9 Duy\u00ean","\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"10 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itviec.com\/blog\/git-shell-la-gi\/#article","isPartOf":{"@id":"https:\/\/itviec.com\/blog\/git-shell-la-gi\/"},"author":{"name":"M\u1ef9 Duy\u00ean","@id":"https:\/\/itviec.com\/blog\/#\/schema\/person\/73733c0725c7e39e696a896bd1abe2d7"},"headline":"Git Shell: Chi ti\u1ebft c\u00e1ch s\u1eed d\u1ee5ng Git trong m\u00f4i tr\u01b0\u1eddng d\u00f2ng l\u1ec7nh","datePublished":"2025-03-31T09:00:45+00:00","dateModified":"2025-06-17T02:02:14+00:00","mainEntityOfPage":{"@id":"https:\/\/itviec.com\/blog\/git-shell-la-gi\/"},"wordCount":2551,"publisher":{"@id":"https:\/\/itviec.com\/blog\/#organization"},"image":{"@id":"https:\/\/itviec.com\/blog\/git-shell-la-gi\/#primaryimage"},"thumbnailUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/03\/git-shell-vippro-scaled.png","articleSection":["Chuy\u00ean m\u00f4n IT"],"inLanguage":"vi"},{"@type":"WebPage","@id":"https:\/\/itviec.com\/blog\/git-shell-la-gi\/","url":"https:\/\/itviec.com\/blog\/git-shell-la-gi\/","name":"Git Shell: Chi ti\u1ebft c\u00e1ch s\u1eed d\u1ee5ng Git trong m\u00f4i tr\u01b0\u1eddng d\u00f2ng l\u1ec7nh - ITviec Blog","isPartOf":{"@id":"https:\/\/itviec.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/itviec.com\/blog\/git-shell-la-gi\/#primaryimage"},"image":{"@id":"https:\/\/itviec.com\/blog\/git-shell-la-gi\/#primaryimage"},"thumbnailUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/03\/git-shell-vippro-scaled.png","datePublished":"2025-03-31T09:00:45+00:00","dateModified":"2025-06-17T02:02:14+00:00","description":"\u0110\u1ec3 s\u1eed d\u1ee5ng Git, tr\u01b0\u1edbc ti\u00ean b\u1ea1n c\u1ea7n t\u00ecm hi\u1ec3u Git Shell l\u00e0 g\u00ec, c\u00e1ch c\u00e0i \u0111\u1eb7t, s\u1eed d\u1ee5ng c\u00e1c l\u1ec7nh Git c\u01a1 b\u1ea3n v\u00e0 kh\u1eafc ph\u1ee5c l\u1ed7i th\u01b0\u1eddng g\u1eb7p.","breadcrumb":{"@id":"https:\/\/itviec.com\/blog\/git-shell-la-gi\/#breadcrumb"},"inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itviec.com\/blog\/git-shell-la-gi\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/git-shell-la-gi\/#primaryimage","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/03\/git-shell-vippro-scaled.png","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/03\/git-shell-vippro-scaled.png","width":640,"height":337,"caption":"git shell - itviec blog"},{"@type":"BreadcrumbList","@id":"https:\/\/itviec.com\/blog\/git-shell-la-gi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Chuy\u00ean m\u00f4n IT","item":"https:\/\/itviec.com\/blog\/chuyen-mon-it\/"},{"@type":"ListItem","position":2,"name":"Git Shell: Chi ti\u1ebft c\u00e1ch s\u1eed d\u1ee5ng Git trong m\u00f4i tr\u01b0\u1eddng d\u00f2ng l\u1ec7nh"}]},{"@type":"WebSite","@id":"https:\/\/itviec.com\/blog\/#website","url":"https:\/\/itviec.com\/blog\/","name":"ITviec Blog","description":"IT Jobs &amp; People in Vietnam","publisher":{"@id":"https:\/\/itviec.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itviec.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/itviec.com\/blog\/#organization","name":"ITviec","url":"https:\/\/itviec.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2018\/12\/itviec-black-square-facebook.png","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2018\/12\/itviec-black-square-facebook.png","width":1800,"height":1800,"caption":"ITviec"},"image":{"@id":"https:\/\/itviec.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ITviec","https:\/\/x.com\/ITviec","https:\/\/www.linkedin.com\/company\/itviec","https:\/\/www.youtube.com\/channel\/UCYthAQ3bcGr57M_ag5gHDvQ"]},{"@type":"Person","@id":"https:\/\/itviec.com\/blog\/#\/schema\/person\/73733c0725c7e39e696a896bd1abe2d7","name":"M\u1ef9 Duy\u00ean","image":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/Author_Duyen-Tran-120x120.jpg","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/Author_Duyen-Tran-120x120.jpg","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/Author_Duyen-Tran-120x120.jpg","caption":"M\u1ef9 Duy\u00ean"},"url":"https:\/\/itviec.com\/blog\/author\/my-duyen\/"}]}},"_links":{"self":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/85362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/users\/209"}],"replies":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/comments?post=85362"}],"version-history":[{"count":2,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/85362\/revisions"}],"predecessor-version":[{"id":88159,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/85362\/revisions\/88159"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/media\/85455"}],"wp:attachment":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/media?parent=85362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/categories?post=85362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/tags?post=85362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}