Pull branch from my repository


I was working in production master branch (and the version was 11, but the branch is master), I was need to do some customization, so I created a branch for me and I did customization under this branch. And I was able to do upgrade for master branch and then merging to my branch. My branch pushed to my github repository (which was forged from erpnext project).

Now erpnext is using branch version-11 for production, what is the best way to pull my branch from my repository without having problems for a fresh installation?

Actually I need to be able to pull my branch and I need also to be able to merge version-11 into my own branch. So how I can do this?

Note: last modification for my branch was in July (and my branch was build based on master branch which is no more existed).


  • Merge frappeā€™s version-11 into your own branch.
  • Do a normal installation of version-11.
  • Add your fork as a git remote on the server
cd frappe-bench/apps/erpnext
git remote set-url upstream YOUR_FORK_URL
git remote add origin https://github.com/frappe/erpnext
  • Check out your branch and migrate
git checkout -t upstream/YOUR_BRANCH
cd ../..
bench migrate

If you want to merge version-11 again, on your server:

cd frappe-bench/apps/erpnext
git fetch origin
git merge origin/version-11

Note: this is just an idea, not tested. Please try it on a development server first.

Once I reached to git checkout -t upstread/YOUR_BRANCH, I get the below error:

frappe@Bilal:~/frappe-bench/apps/erpnext$ git checkout -t upstream/travel
fatal: 'upstream/travel' is not a commit and a branch 'travel' cannot be created from it

Please note that the branch in my repository was originally created from master branch of version 11 and as you know, that currently the master branch is becoming version-11.

I believe if my branch was created from version-11 branch, I will not face this problem. So from here we need to think and find solution.


I would like to add something:
The problem certainly with head branch, version-11 but if I selected v11.1.49 which is the latest version, then I do not face any problem in the merging.

For example, I tried the following and it worked:

git checkout v11.1.49
git checkout -b travel
git pull GitHub - bghayad/erpnext: Open Source ERP built for the web travel

Every thing was fine and no problem
But when I tried to merge version-11 into travel, I got the error:

fatal: refusing to merge unrelated histories

I am sure 100% if my branch was build based on version-11, I will not face this problem.

Can someone advise what to do?