Skip to content

Instantly share code, notes, and snippets.

@duc-codehq
Last active September 14, 2021 08:25
Show Gist options
  • Save duc-codehq/d1a4eb91197385bc8ef491c81eaa6422 to your computer and use it in GitHub Desktop.
Save duc-codehq/d1a4eb91197385bc8ef491c81eaa6422 to your computer and use it in GitHub Desktop.
Git note
1. Lấy code mới
- git status (kiểm tra đang ở branch nào)
- git checkout {branch name} (chuyển sang branch cần lấy code về)
- git fetch && git pull origin {branch name}
2. Tạo branch mới để code
- git checkout {parent branch name} (checkout branch cha của branch chuẩn bị làm, thường là branch master)
- git fetch && git pull origin {parent branch name}
- git checkout -b {branch name} (tạo branch mới từ branch hiện tại (parent branch name))
3. đẩy code và branch lên
- git add {file} (đoạn này add file trong vscode cho tiện)
- git commit -m "mesage của commit" (commit mấy files đã add lên git)
- git push origin {branch name} (đẩy code lên origin)
4. tạo pull request - lên trang github --> vào tab pull request để tạo 1 pull request
Khi tạo PR thì xem đoạn này: https://github.com/wapopartners/NZME-PageBuilder-Fusion-Features#development--deployment-process
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment