Git ignore local changes to portions of tracked files

后端 未结 4 1153
死守一世寂寞
死守一世寂寞 2020-12-04 09:07

Specifically, I maintain a git repository of my dotfiles. I recently started working on a new machine and cloned my repository on the same.

Now, I wish to make some

4条回答
  •  无人及你
    2020-12-04 09:44

    As suggested by Peter you can keep those machine specific changes in a branch. Obviously you will have to be careful to strictly separate changes to those machine specific files from the "mainline". There are 2 ways for doing this:

    1. Keep rebasing the branch whenever you change the mainline (this would be my preference)
    2. Keep merging mainline changes into the branch (but obviously never merge in the other direction)

提交回复
热议问题