Gitを個人で練習中です。
理由は学生ハッカソンに参加した際にGit操作になれておらず迷惑をかけたため・masterブランチでpushする方法しか知らずさらに迷惑になるので
です。
Gitのターミナル操作はプロゲートで学習したのですが、masterブランチしか紹介されていませんでした。
また、検索したのですが適切な解決策がみつかりませんでした。
たとえばtext.txtをメッセージ付与でpushしている形式ですが、リモート名をtest。
Git
1git init 2git add text.txt 3git commit -m “メッセージ" 4git remote add test URL 5git push test master
masterを外してgit push test
と記述すると
Git
1fatal: The current branch master has no upstream branch. 2To push the current branch and set the remote as upstream, use 3 4 git push --set-upstream test master
と警告が表示されるのでgit push test master
でpushしています。
masterブランチ以外でpushするにはどう記述するのが良いですか?
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。