我在本地项目目录中有一个修改后的文件htmlpage.html,我想从bitbucket的远程分支中提取对该文件的更改而不会影响我的本地文件更改
Instead of committing or creating a new branch, simply make sure, as I explain here , to have:
git config --global pull.rebase true
git config --global rebase.autoStash true
From there, any git pull will automatically:
pull --rebase
) htmlpage.html
Another approach, I detailed here :
git update-index --skip-worktree -- htmlpage.html
# to cancel it:
git update-index --no-skip-worktree -- htmlpage.html
Save a copy of your file first, before testing a git pull
: htmlpage.html
snould remain unchanged.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.