Reputation: 57411
I'm trying to follow the Aptible Django Quickstart Tutorial for project which has an existing git repository. After completing the step
git remote add aptible "$GIT_REMOTE"
where $GIT_REMOTE
is the git remote created by the aptible apps:create
command with the Aptible CLI, I now have two remote repositories:
Kurts-MacBook-Pro:lucy-web kurtpeek$ git remote -v
aptible [email protected]:lucy/web.git (fetch)
aptible [email protected]:lucy/web.git (push)
origin https://github.com/startwithlucy/lucy.git (fetch)
origin https://github.com/startwithlucy/lucy.git (push)
Before doing that, I created a new branch which is also called aptible
and checked it out (using git checkout -b aptible
). My git status
shows I'm currently on this branch:
Kurts-MacBook-Pro:lucy-web kurtpeek$ git status
On branch aptible
What I would now like to do is push the contents of the aptible
branch on the origin
remote to the master
branch of the aptible
remote. How can I do this? Would the appropriate command be
git push aptible:master origin:aptible
?
Upvotes: 1
Views: 586
Reputation: 128
To push a branch to different remote,
Then push the git content to remote (aptible)
git push aptible HEAD:master
UPDATE: Apparently, you don't need to checkout branch before you push them. However, if you want to view/fix the branch, you can checkout using git checkout aptible
Upvotes: 3