Git: How to update/checkout a single file from remote origin master?

后端 未结 7 926
长发绾君心
长发绾君心 2020-12-12 08:41

The scenario:

  1. I make some changes in a single file locally and run git add, git commit and git push
  2. The file is
7条回答
  •  [愿得一人]
    2020-12-12 09:19

    Or git stash (if you have changes) on the branch you're on, checkout master, pull for the latest changes, grab that file to your desktop (or the entire app). Checkout the branch you were on. Git stash apply back to the state you were at, then fix the changes manually or drag it replacing the file.

    This way is not sooooo cool but it def works if you guys can't figure anything else out.

提交回复
热议问题