将现有代码推送到现有存储库:Bitcucket

时间:2020-03-17 11:09:47

标签: git github bitbucket

我有一个私人存储库(假设:出租)

我推送了一些代码。现在,我想将另一个项目推送到该存储库。显然,我想用新代码替换以前的代码。

在命令行中将执行什么步骤?

git remote show origin


* remote origin
  Fetch URL: https://nafeeur10@bitbucket.org/xxxxx/rental.git
  Remote branch:
    master new (next fetch will store in remotes/origin)
  Local ref configured for 'git push':
    master pushes to master (local out of date)

现在这是条件。

我正在尝试使用以下命令:

1. git init
2. git commit -m "New Commit"

给我这个错误:

On branch master
Your branch is up to date with 'github/master'.
nothing to commit, working tree clean

1 个答案:

答案 0 :(得分:1)

尝试:git push --set-upstream origin master推送到名为origin的远程存储库。