LogoDuyệtSr. Data Engineer
HomeAboutPhotosInsightsCV

Footer

Logo

Resources

  • Rust Tiếng Việt
  • /archives
  • /series
  • /tags
  • Status

me@duyet.net

  • About
  • LinkedIn
  • Resume
  • Projects

© 2026 duyet.net | Sr. Data Engineer

Git - Cách xem nội dung 1 file ở branch khác

Note: This post is over 11 years old. The information may be outdated.

Nếu bạn đang ở 1 nhánh, và bạn muốn xem nội dung của 1 file nằm ở trên nhánh khác mà không cần phải checkout. Bạn có thể thực hiện xem nhanh bằng lệnh:

$ git show branch:file

Ví dụ bạn đang ở branch new-thing, và cần xem thử file app/controllers/AuthController.js nằm ở other-branch, bạn gõ như sau:

$ git show other-branch:app/controllers/AuthController.js

Vậy là bạn đã có thể xem nhanh nội dung file AuthController.js mà không cần phải checkout other-branch.

Aug 25, 2015·10 years ago
|Git|
TutorialGit
|Edit|