Git uncertainty - customizable but capable of pulling upstream changes?

I have a phabricator . Being relatively green with git, what is a reasonable / correct way to make sure that I can have my own configuration files (and maybe some hacks in other files) coexist with what comes from the upstream?

+3
source share
2 answers

Save changes in a separate branch. Suppose you track upstream changes in a branch vendorand work in the branches master. Then you will do something like this to make updated updates:

  • Go to the branch vendor:

    git checkout vendor
    
  • Pull for new updates:

    git pull
    
  • Go to the branch master:

    git checkout master
    
  • Merge Changes:

    git merge vendor
    
  • .

... , http://github.com/spiffy/project.git, master . :

$ git clone http://github.com/spiffy/project.git
$ cd project

vendor master. master vendor:

$ git branch -m master vendor

, clone:

$ git config --get-regexp 'branch.vendor.*'
branch.vendor.remote origin
branch.vendor.merge refs/heads/master

master:

$ git checkout -b master

!

+3

- , , .gitignore. , .

0