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

FAILED -------------------- 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 https://github.com/akhilgopinath/discourse.git", "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"]} 6e310eb9e7118b3c581192a00c1a6a552364e9db09dba5238b20b13aab8d0f3f ** 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 https://meta.discourse.org/t/19157 for details hooks: after_code: - exec: cd: $home/plugins cmd: - git clone https://github.com/discourse/docker_manager.git - exec: cd: $home cmd: - git remote remove origin - git config --remove-section branch.master - git config --remove-section branch.tests-passed - git remote add origin https://github.com/akhilgopinath/discourse.git - 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
or
- 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.

3 Likes