Error while pulling from Forked repository

I was trying to pull the code from discourse forked version , i updated app.yml file with my github repository but when rebuild app i am getting this error

Pups::ExecError: cd /var/www/discourse && git config --remove-section branch.tests-passed failed with return #<Process::Status: pid 274 exit 128>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "cmd"=>["git remote remove origin", "git config --remove-section branch.master", "git config --remove-section branch.tests-passed", "git remote add origin", "git fetch", "git remote set-branches --add origin tests-passed", "git remote set-branches --add origin master", "git branch -u origin/master master", "git branch -u origin/tests-passed tests-passed", "git reset --hard origin/master", "git reset --hard origin/tests-passed"]}
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

my app.yml is this

## Plugins go here
## see for details
    - exec:
        cd: $home/plugins
          - git clone
    - exec:
        cd: $home
          - git remote remove origin
          - git config --remove-section branch.master
          - git config --remove-section branch.tests-passed
          - git remote add origin
          - git fetch
          - git remote set-branches --add origin tests-passed
          - git remote set-branches --add origin master
          - git branch -u origin/master master
          - git branch -u origin/tests-passed tests-passed
          - git reset --hard origin/master
          - git reset --hard origin/tests-passed

can you please help me on this ?

I’m not a git expert, but I think that to make the current existing branch track a new remote branch, you don’t include the branch name at the end of the -u command. Try:

- git branch -u origin/master
- git branch -u origin/tests-passed

You could probably save yourself a lot of trouble by making the changes you need in a plugin instead of forking the repo.