Skip to content

Ex3_HoangThanhTuan

  • Truy cập link https://gitlab.com/tubcvt/git-basic-ex3.git chọn fork -> chọn repo của mình.
  • Pull code về local: git clone https://gitlab.com/hoangthanhtuanit/git-basic-ex3
  • Chuyển qua thư mục vừa pull về để làm việc: cd git-basic-ex3\
  • Kiểm tra xem có tồn tại branch feature_awesome_cherry không: git branch -a
  • Chuyển qua branch feuture_awesome_cherry: git checkout feature_awesome_cherry
  • Mở file: "doit.txt" (Thêm nội dung bất kỳ)
  • Sử dụng: git stash save để lưu lại các thay đổi chưa commit để chuyển qua branch khác.
  • Chuyển qua nhánh hot-fix: git checkout hot-fix
  • Dùng lệnh "f.txt" để mở file sau đó thêm nội dung hot-fix-here lưu lại và thoát.
  • Thêm file f.txt vào stage: git add f.txt
  • Commit file: git commit -m "Edit content file"
  • Push lên hệ thống: git push origin hot-fix
  • Quay trở lại nhánh cũ để làm việc tiếp: git checkout feature_awesome_cherry
  • Xem lại danh sách các lần thay đổi trước đó: git stash list
  • git stash pop stash@{0} để lấy lại thay đổi trước đó.
  • Thêm file vào stage: git add .
  • Commit file: git commit -m "Add file doit.txt and rs.txt"
  • Push code lên hệ thống: git push origin feature_awesome_cherry
  • Merge request lên git mà đã fork về.

Merge request reports

Loading