Hiển thị các bài đăng có nhãn revert. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn revert. Hiển thị tất cả bài đăng

How to revert to origin's master branch's version of file

Source: https://stackoverflow.com/questions/1817766/how-to-revert-to-origins-master-branchs-version-of-file

Assuming you did not commit the file, or add it to the index, then:
git checkout -- filename
Assuming you added it to the index, but did not commit it, then:
git reset HEAD filename
git checkout -- filename
Assuming you did commit it, then:
git checkout origin/master filename
Assuming you want to blow away all commits from your branch (VERY DESTRUCTIVE):
git reset --hard origin/master

To view the differences going from the remote file to the local file:
git diff remotename/branchname:remote/path/file1.txt local/path/file1.txt

anti-pattern là gì

  Trong công nghệ và lập trình, Anti-pattern (mẫu phản diện) là những giải pháp bề ngoài có vẻ hiệu quả để giải quyết một vấn đề phổ biến, ...