version control - upgrade a revised module using GIT -
i used open source library in project. according requirements, changed many parts of open source library code.
now, there new version of opensource library, , wanted merge changes did new version of open source library.
since may need make more changes source code , there next versions of library, think better have semi-automatic way marge.
first, can clone git repo locally , make changes.
when ready merge changes new version of open source library, can follow these steps (assume working on master
branch):
# on master branch git pull origin master --rebase # if there have conflict files, can modify/save files, use `git add .` , `git rebase --continue` git push origin master
to solve conflict files automatically, can use -x
option:
git pull origin master --rebase -x theirs
, solve conflict file keeping local master
version.
git pull origin master --rebase -x ours
, solve conflict file keeping origin/master
version.
Comments
Post a Comment