[haiku-development] Re: Updating by git if I modify some files in haiku tree?

  • From: "Thomas Mueller" <mueller6723@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 12 May 2017 22:45:46 +0000


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.

Thanks for the help, now I know better what to do.

My manual method might be good when changes to affected files are few and 
infrequent; otherwise I would need something like "git stash".

I can run "git help stash", etc., but some things can still be confusing; this 
is also true of subversion, which FreeBSD uses to update source, ports and doc 
trees.

Getting the plain files, not HTML-formatted versions, is critical.  I also 
don't want to get gzip version as might happen with Lynx, at least under 
FreeBSD and NetBSD; I haven't tried haikuports version.

Tom


Other related posts: