Các lệnh với github
Nguyễn Quang Minh
-- 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.