git pull keeping local changes

后端 未结 6 1504
南旧
南旧 2020-11-30 17:14

How can I safely update (pull) a git project, keeping specific files untouched, even if there\'s upstream changes?

myrepo/config/config.php

Is there a way, o

6条回答
  •  [愿得一人]
    2020-11-30 17:35

    Incase their is local uncommitted changes and avoid merge conflict while pulling.

    git stash save
    git pull
    git stash pop
    

    refer - https://happygitwithr.com/pull-tricky.html

提交回复
热议问题