2017-05-25 12 views
-1

私はGitHubリポジトリを持っていますが、今はアクセスしてからブランチします。 GitHubデスクトップを使ってリポジトリを作成しました。しかし、私はターミナルからこのリポジトリにアクセスして、それを枝分かれしたいと思っています。私は、URLリンクとしてCDを試みたが、ターミナルで次き:端末git bashを通して既存のgitリポジトリにアクセスするには?

$ git init 
Reinitialized existing Git repository in C:/Users/tracyandgrant/Documents/Treehouse notes/portfolio/.git/ 

$ git status 
On branch master 
Untracked files: 
    (use "git add <file>..." to include in what will be committed) 

     experience.html 
     images/ 
     index.html 
     styles.css 

nothing added to commit but untracked files present (use "git add" to track) 

$ git add . 
warning: LF will be replaced by CRLF in index.html. 
The file will have its original line endings in your working directory. 
warning: LF will be replaced by CRLF in styles.css. 
The file will have its original line endings in your working directory. 

$ git commit -m 'initial commit with git bash' 
[master 8c29fcb] initial commit with git bash 
9 files changed, 509 insertions(+) 
create mode 100644 experience.html 
create mode 100644 images/WorldMap.gif 
create mode 100644 images/github.svg 
create mode 100644 images/kiwiicon.jpg 
create mode 100644 images/landscape.jpg 
create mode 100644 images/otago-logo.png 
create mode 100644 images/treehouse.png 
create mode 100644 index.html 
create mode 100644 styles.css 

$ git remote add origin [email protected]:TracyExcell/Portfolio.git 

$ git push -u origin master 
The authenticity of host 'github.com (192.30.255.112)' can't be established. 
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8. 
Are you sure you want to continue connecting (yes/no)? 
Host key verification failed. 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

$ git remote add origin https://github.com/TracyExcell/Portfolio 
fatal: remote origin already exists. 


$ cd https://github.com/TracyExcell/Portfolio 
bash: cd: https://github.com/TracyExcell/Portfolio: No such file or directory 

あなたがこれを行う方法を知っていればあなたが助けてくださいことができます。ありがとうございました。

+0

ブレイクの方法については、まずドキュメントをご覧ください。https://git-scm.com/book/en/v2/Git-Branches-Branches-in-a-Nutshell – KeithC

+0

私はあなたがセットアップする必要があると思いますssh証明書を使用して、リポジトリに接続してプッシュすることができます。 https://help.github.com/articles/connecting-to-github-with-ssh/ – eftshift0

答えて

0

レポを再初期化する必要はありません。あなたがしたいことがあなたのものではない場合は、リポジトリをフォークし、上流と原点という別々のリモート名を設定します。ブランチングはその問題の外部ですが、2セットのリモートトラッキングブランチが表示されます。

関連する問題