如何推到特定遥控器的特定分支

  • 本文关键字:分支 遥控器 何推 git
  • 更新时间 :
  • 英文 :


我正在尝试遵循具有现有GIT存储库的项目的可符合的Django QuickStart教程。完成步骤

git remote add aptible "$GIT_REMOTE"

其中 $GIT_REMOTEaptible apps:create命令使用可恰当CLI创建的git遥控器,我现在有两个远程存储库:

Kurts-MacBook-Pro:lucy-web kurtpeek$ git remote -v
aptible git@beta.aptible.com:lucy/web.git (fetch)
aptible git@beta.aptible.com:lucy/web.git (push)
origin  https://github.com/startwithlucy/lucy.git (fetch)
origin  https://github.com/startwithlucy/lucy.git (push)

在这样做之前,我创建了一个新的分支,该分支也称为aptible并将其签出(使用git checkout -b aptible(。我的git status显示我目前在这个分支上:

Kurts-MacBook-Pro:lucy-web kurtpeek$ git status
On branch aptible

我现在想做的是将origin遥控器上的aptible分支的内容推到aptible遥控器的master分支。我怎样才能做到这一点?适当的命令是

git push aptible:master origin:aptible

将分支推到其他遥控器,

然后将git内容推到遥控(可恰当(

git push aptible HEAD:master

更新:显然,在推开之前,您不需要结帐分支。但是,如果要查看/修复分支,可以使用git checkout aptible

结帐

最新更新