Reputation: 4171
I'm learning git and just experimenting, so there is not real reason I need to do this yet:
I tried running
git push path_to_local_repo master
form a different local repository.
I got this error:
Why is git angry?
Upvotes: 0
Views: 63
Reputation: 22609
The problem is that you are trying to push to the currently checked-out branch in the other local git repo. Possible work-arounds: push to a different branch and then manually merge that branch into master
git push ~/root-working master:godaddy-master
cd ~/root-working
git merge --ff-only godaddy-master
or just go into the other folder and pull from there
cd ~/root-working
git pull ~/root-godaddy
Upvotes: 1
Reputation: 5461
You want to push a local repo to another remote repo, right?
If so:
git push [remote] branch_name
Upvotes: 0