Các lệnh với github

Nguyễn Quang Minh

1 min read
94 views

-- View log push

git log

-- Switch branch

git checkout your-branch-name

-- Reset return commit

git reset --hard <commit_id>

-- Push branch overwrite

git push --force

-- Cấp giữ các thay đổi tạm thời

git stash

-- Xóa nhánh trên local:

git branch -d branch-name

-- Xóa nhánh trên local với nhánh chưa được merge vào main

git branch -D branch-name

-- Xóa nhánh trên remote

git push origin --delete branch-name

-- Checkout ra nhánh mơi từ nhánh hiện tại

git checkout -b new-branch

-- xem lại lịch sử commit

git reflog

-- Reset lại 1 commit

git reset --hard <commit-hash>

--- Đẩy nhánh ghi đè

git push --force

Nguyễn Quang Minh

Passionate developer and writer sharing insights about technology, programming, and digital innovation. Follow for more content about web development and tech trends.

1.2K followers

Stay Updated

Get the latest articles and insights delivered to your inbox.

Ôn tập là dễ

Ôn tập là dễ

Nền tảng thi trắc nghiệm số 1 Việt Nam giúp bạn tạo, quản lý và chia sẻ bộ đề một cách nhanh chóng và dễ dàng.

© 2025 Ôn tập là dễ. Tất cả các quyền được bảo lưu.

    🔥 Mua sắm ngay trên Shopee!
    Giúp mình duy trì trang web! 🎉