On Fri, May 12, 2017 at 04:56:56AM +0000, Thomas Mueller wrote:
If I modify some files in haiku tree, would they be overwritten when I run
"git pull" and there is an upstream update for one or more of those files?
No, git will warn you that it cannot update these files because that
would overwrite your changes.
Changes to files that contain string "HOST_PLATFORM" seem to occur
infrequently, so I suppose in the great majority of cases, if I update (git
pull) frequently, git pull will run as if nothing were amiss.
Yes, when there are no conflicts.
But if one or more such files are updated, I suppose I could delete or move
my version, and run "git pull" again?
Or maybe I could run
git reset --hard
which, so it seems from the documentation, would go back to the upstream
repository version, wiping out my modifications, which I would have saved
in outside location.
Would that work?
Yes. Or as mmu_man suggested, you can use "git stash", which is the git
way of 'saving outside location'. But if you prefer to do this manually
for now, it's fine too.
Or maybe if the number of files affected is very small, I could download
via gitweb interface, or does that not exist?
at http://cgit.haiku-os.org. Be sure to get the "plain" files and not
the HTML formatted versions, of course.
Adrien.