我嘗試下面的命令和失敗:混帳中心庫創建失敗
> cd SecurityAlert/
> sudo apt-get install git
> git init
> git add .
> git config --global user.email "[email protected]"
> git config --global user.name "user"
> git commit -m "First commit"
> git remote add origin https_link_github.com/user/SecurityAlert
> git push origin master
To https_link_github.com/user/SecurityAlert
! [rejected] master -> master (non-fast-forward)error: failed to push some refs to 'https_link_github.com/sandeepmhptr/SecurityAlert' hint: Updates were
rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
git pull
There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details git pull
If you wish to set tracking information for this branch you can do so with: git branch --set-upstream-to=origin/ master
> git remote add -v
> git remote -v
遠程URL是git remote add origin https://github.com/sandeepmhptr/SecurityAlert,我在這裏寫過git remote add origin https_link_github.com/sandeepmhptr/SecurityAlert,因爲這個站點有些問題,它不允許超過2個網址 – chinmay
嗨,我再次嘗試了所有這些步驟,並且它成功了 – chinmay
好吧,看起來好像遙控器已經初始化了一點。我添加了一些更多的信息來澄清答案。如果這確實有幫助,或者回答了您的問題,我將非常感謝複選標記或投票。 – LightCC