1. Git flow
Work on new brand:
git checkout -b your-new-branch
Sau đó thêm thay đổi của bạn tới staged và commit nó:
git add . hoặc git add your-file-name
git commit -m "Nội dung của commit"
Sau khi commit, hợp nhất code từ nhánh vừa rồi:
Kéo mã mới nhất về: git pull origin dev hoặc git pull origin master
Khắc phục conflict nếu có và commit nó
git checkout master
git pull origin master
git checkout your-new-branch
git rebase master
git add .
git rebase --continue
Đẩy lên nhánh của bạn:
git push origin your-new-branch
Tạo yêu cầu hợp nhất trên kho lưu trữ
References:
- https://git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F
- https://www.freecodecamp.org/news/what-is-git-and-how-to-use-it-c341b049ae61/
- https://topdev.vn/blog/git-la-gi/
- https://www.atlassian.com/git/tutorials/git-ssh
- https://viblo.asia/p/git-dung-https-hay-ssh-eW65Gm9jZDO
- https://docs.github.com/en/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys
Đăng nhận xét