質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
terminal

Terminalは、Apple社のmacOSに標準で付属しているUNIX端末エミュレータ。UNIXコマンドによってMacの操作および設定を行うことができます。

Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

GitHub

GitHubは、Gitバージョン管理システムを利用したソフトウェア開発向けの共有ウェブサービスです。GitHub商用プランおよびオープンソースプロジェクト向けの無料アカウントを提供しています。

Q&A

0回答

864閲覧

既存のリモートリポジトリがあるところに、ファイルの追加・

Deep_passion

総合スコア45

terminal

Terminalは、Apple社のmacOSに標準で付属しているUNIX端末エミュレータ。UNIXコマンドによってMacの操作および設定を行うことができます。

Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

GitHub

GitHubは、Gitバージョン管理システムを利用したソフトウェア開発向けの共有ウェブサービスです。GitHub商用プランおよびオープンソースプロジェクト向けの無料アカウントを提供しています。

0グッド

1クリップ

投稿2021/04/02 07:36

編集2021/04/02 09:14

前提・実現したいこと

ここに質問の内容を詳しく書いてください。

簡潔=>既存のリポジトリに。新しく作成した、ファイルを追加したいです。

詳しい内容=>

https://github.com/Taitai6521/git_repo_back === A
上の、リポジトリ(すでにデプロイしてある)に、さらに、ファイルを追加したいのですが、どうすれば良いのかわかりかねます。

ff.htmlがまだうえ(A)のリポジトリに入っていないので、それを、add,commitして、
remoteの登録はすでに、bakで、してるので、
git push bak masterとして、ff.htmlのファイルをデプロしたいです。

■■な機能を実装中に以下のエラーメッセージが発生しました。

発生している問題・エラーメッセージ

base) SN:git_tutorial SN$ git init Reinitialized existing Git repository in /Users/SN/プログラミング/git_tutorial/.git/ (base) SN:git_tutorial SN$ ls ff.html index1.html secret.txt train train.py (base) SN:git_tutorial SN$ git add ff.html (base) SN:git_tutorial SN$ git commit -m"try" [master df5a712] try 1 file changed, 2 insertions(+) create mode 100644 ff.html (base) SN:git_tutorial SN$ git s On branch master Your branch is ahead of 'bak/master' by 1 commit. (use "git push" to publish your local commits) Untracked files: (use "git add <file>..." to include in what will be committed) train nothing added to commit but untracked files present (use "git add" to track) (base) SN:git_tutorial SN$ git remote add origin https://github.com/Taitai6521/git_repo_back fatal: remote origin already exists. (base) SN:git_tutorial SN$ git push bak master To https://github.com/Taitai6521/git_repo_back.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/Taitai6521/git_repo_back.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. (base) SN:git_tutorial SN$

試したこと

新しく、
git remote add tutorial(任意の名前) https://github.cm/user
で、やって、pushすればできるのですが、すでにあるものだとわからないです。エラーが出ます。

補足情報(FW/ツールのバージョンなど)

mac11,2,1
, terminal
よろしくおねがいします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

fiveHundred

2021/04/02 07:37

teratailタグではなく、適切なタグを設定してください。
K_3578

2021/04/02 08:21

Githubタグで良いでしょう。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問