Hmm, I’m trying this, but something is not working as it should.
I’m in the apps/erpnext
directory, then I run:
$ git fetch upstream master
remote: Counting objects: 11, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 11 (delta 9), reused 6 (delta 4), pack-reused 0
Unpacking objects: 100% (11/11), done.
From https://github.com/frappe/erpnext
* branch master -> FETCH_HEAD
Looks like there was a master
branch, but then
$ git checkout master
error: pathspec 'master' did not match any file(s) known to git.
Looking at all available branches, it looks like just a few and no master
:
$ git branch -a
* develop
remotes/upstream/HEAD -> upstream/develop
remotes/upstream/develop
So to make sure I’m using the right repository:
$ git remote -v
upstream https://github.com/frappe/erpnext (fetch)
upstream https://github.com/frappe/erpnext (push)
But that looks correct.
So where is the master
branch?
This is really weird.
Could it be, that with bench get-app erpnext https://github.com/frappe/erpnext
only a part of the repository is cloned?
Because it’s actually very big and trying a full clone takes much much longer than running the bench get-app
command.
Looking at the Git configuration, the upstream
section looks suspicious:
$ cat .git/config
<snip>
[remote "upstream"]
url = https://github.com/frappe/erpnext
fetch = +refs/heads/develop:refs/remotes/upstream/develop
<snip>
In some other Git repository it would be:
[remote "origin"]
url = git@github.com:pgRouting/pgrouting.git
fetch = +refs/heads/*:refs/remotes/origin/*
So it seems, that other branches got hidden.