-1

So a guy and I are working on a branch, and I've got some configuration files that only I use, something like this:

A-FILE 1 A-FILE 2 A-FILE 3 B-FILE 1 B-FILE 2

A-FILES 1-2-3 are files that I will later commit, but B-FILES 1-2 are files that only I need, I don't want to commit them nor stash them.

So, I need to make a pull now to update my project with the other guy's changes, but git tells me I can't because my changes over B-FILES 1-2 will be overwritten by the pull.

No idea what to do in these cases, any advice is welcome.

Artemix
  • 8,497
  • 14
  • 48
  • 75

1 Answers1

1

You cannot do what you want without stashing, but you can configure git to automaticaly stash before the pull and unstash after. According to this answer, you have to have both rebase.autoStash and pull.rebase settings set to true. Then git pull will have the behavior you're looking for.

Community
  • 1
  • 1
Hugo Wood
  • 2,140
  • 15
  • 19