1

I am using GIT Workflow (develop, master, feature, release) branches for our software development. Now our software has few internal dependents packages in package.json coming directly from our enterprise GIT on a specific branch (e.g. git+ssh://git@ourdomain.com:2999/coredependency.git#develop).

Now, our current develop branch code is pointing to the develop branch of the dependent packages for QA (as shown above), the reason being, the current changes in QA may have changes on dependent packages to work and once the QA is passed, we merge the dependent packages code from their develop to master and update our package.json (in release branch) to point to the master branch of those dependencies.

Now according to the workflow, after the deployment, we are merging the release branch into master and develop and the problem is, I don't want the package.json pointing to master (in release branch) be merged into develop branch but only in the master branch with a tag.

Glimpse of my Package.json

"dependencies": {
    "core": "git+ssh://git@ourdomain.com:2999/coredependency#master",
    "intelligence": "git+ssh://git@ourdomain.com:2999/dependency2.git#feature/jk-1212",
    "notifications": "git+ssh://git@ourdomain.com:2999/dependency3.git#master",
    "social": "git+ssh://git@git.ccmteam.com:2999/cdependency4#develop",
    "gulp-cli": "2.0.1",

What could I do to avoid this situation? as we merge our code using Pull Requests

Umer
  • 149
  • 1
  • 1
  • 8

1 Answers1

0

One workaround would be to:

  • push develop to your normal remote origin
  • merge as usual back to develop (which may change the package.json)
  • use the node-version-match package to reset the develop package.json version back to the ones you just pushed before the merge.

Another approach is: if the package.json has changed after a merge, do

git checkout @~ -- package.json
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250