我有一个私人存储库(假设:出租)
我推送了一些代码。现在,我想将另一个项目推送到该存储库。显然,我想用新代码替换以前的代码。
在命令行中将执行什么步骤?
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
答案 0 :(得分:1)
尝试:git push --set-upstream origin master
推送到名为origin
的远程存储库。