- 投稿日:2021-03-02T21:36:36+09:00
【Git】mainブランチに戻りながら、もともとのブランチをmergeする方法
ひと繋ぎのコマンドにしてしまう
あれこれ作業をして、そろそろmainブランチに統合しておこう、となったら、
$ git commit -am 'コメントを入力'まずadd, commitして、その後に、
$ git push origin HEAD && git checkout main && git merge - && git push origin HEADとすると、mainブランチに戻りながら、作業していたブランチの情報をmergeして、かつリモートリポジトリにpushすることができます。
補足
$ git branch -b ブランチ名でブランチを作成して、そのブランチに移動できます。
参考
【はむ式】Firebase未経験者のためのReactで作るチャットアプリ開発入門!最速最短でゴール到達!
Udemyの上記教材、
13. サインインページを作ろう
のカリキュラムで出てきて便利だったので記事にしておきます。
- 投稿日:2021-03-02T18:51:33+09:00
GitHubのContribution数が異常に増える
GitHubのContribution数が異常に増える
GitHubのContribution数が異常に増える不具合に遭遇しました.(実際のコミット数・プルリク数等の数倍の値が表示されていました)
同様の不具合を見つけましたが,解決には至りませんでした.
Repository commit count wrong - Stack Overflowから引用.最終的に解決できたので,その方法を備忘録として残しておきます.
前提
GitHubのContributionはデフォルトブランチ・
gh-pages
ブランチのコミット等をカウントしています.詳しくは下記をご覧ください.
コントリビューションがプロフィールに表示されないのはなぜですか? - GitHub Docs解決策
- GitHubのレポジトリにブランチが複数ない場合は新たに作成する.
- デフォルトブランチを切り替える(一時的)
- 即座にデフォルトブランチを元に戻す
- ブランチを新たに作成していたら,削除する
上記の手順で解決できました.デフォルトブランチの切り替え方は下記をご覧ください.
Changing the default branch - GitHub Docs参考
- 投稿日:2021-03-02T14:28:06+09:00
git clone で the remote end hung up unexpectedly
git cloneができない
warning: templates not found in /usr/local/git/share/git-core/templates error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54 fatal: the remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed闘いの記録
postBufferを調整セヨ
っていうところからスタートしたものの、
結局はdepth
にも手を出さないと解決しなかった。1445 git config http.postBuffer postBuffer 2M 1446 git clone https://github.com/(略) 1447 git config http.postBuffer postBuffer 4M 1448 git clone https://github.com/(略) 1449 git config http.postBuffer postBuffer 8M 1450 git clone https://github.com/(略) 1451 git config http.postBuffer postBuffer 16M 1452 git clone https://github.com/(略) 1453 git config http.postBuffer postBuffer 32M 1454 git clone https://github.com/(略) 1455 git config http.postBuffer postBuffer 64M 1456 git clone https://github.com/(略) 1457 git config http.postBuffer postBuffer 150M 1458 git clone https://github.com/(略) 1459 git config http.postBuffer postBuffer 300M 1460 git clone https://github.com/(略) 1461 git clone -b develop --depth 1 https://github.com/(略) 1462 cd (略) 1464 git fetch --depth 2 1465 git fetch --depth 3 1466 git fetch --depth 4 1467 git fetch --depth 5 1468 git fetch --depth 10 1469 git fetch --depth 20 1470 git fetch --unshallow参考
- 投稿日:2021-03-02T11:34:12+09:00
【Git】pre-commitをスキップする
以下にてpre-commitをスキップできる
$ git commit --no-verify