Git là một hệ thống quản lý phiên bản (VCS), một loại VCS phân tán chạy nhanh, ổn định, dễ sử dụng. Git là mã nguồn mở, có thể cài đặt và sử dụng trên nhiều nền tảng.
git config --global user.name newnamegit config --global user.email newmail@domain.comgit initgit init --baregit statusgit status -sgit clone path git add git add filename git add *.c git add -A git add . git add - git commit -m "Thông báo ..." git commit --amend -m "Thông báo ..." git log git log -4 git log -4 -p git log --pretty=oneline git log --oneline git diff stagedgit diff --staged staged và commit cuốigit rm filename git reset HEAD filename git checkout -- filename git checkout [hash] filename git checkout [hash] . git clean -d -fx . git remote git remote -v git remote add name_remote addr_remote git fetch name_remote git pull name_remote name_branch git push name_remote name_branch git remote show name_remote git remote rename abc xyz git tag git tag -a tagname -m "Ghi chú" git tag -a tagname -m "Ghi chú" hash git show tagname git push origin tagname git push origin --tags git checkout tagname git checkout -b newbranchname tagname git push --delete origin tagname git tag -d tagname git branchgit branch -vgit branch --mergedgit branch --no-mergedgit branch branchnamegit checkout -b branchnamegit checkout branchnamegit merge branchnamegit base branchnamegit mergetoolgit branch -d branchnamegit checkout master # chuyển về nhánh master git checkout --orphan temp_branch # tạo nhánh temp_branch không chứa lịch sử commit git add -A # thêm các file vào nhánh git commit -am "Init" # commit đầu tiên git branch -D master # xóa nhánh master git branch -m master # đổi tên nhánh hiện tại (temp_branch) thành master git push -f origin master # push thay đổi lên Remote
git checkout IDcommitB -- $(git diff --name-only IDcommitA IDcommitB)