0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Github使い方、メモ

Last updated at Posted at 2019-09-27

https://tsuyopon.xyz/
web白熱教室の課題の提出方法
1.課題のページに飛ぶ。
2.GitHubの課題レポジトリに行く。
3.自分のアカウントにForkする。
4.保存したいところを開いてcloneする。
5.code . レポジトリをベースにvscodeが開く。
6.ターミナルを開く。
7.git branch
自分のローカル環境にあるブランチの確認
8.git checkout -b develop
9.git branch  developになってるか確認
10.HTMLの編集
11.git status 変更したファイルの一覧を確認
12.git diff 変更したファイルのソースコードを確認
13.git commit -m origin develop
(修正した場合) git commit -m "コミットメッセージ"
fix:バグ修正
add:新規(ファイル)機能追加
update:機能修正(バグではない)

14.git push -u origin develop
15.PullRequestする  
matser 自分 ← develop 自分 
16.PullRequestをMergeする 

error.png

web上でdeleteしたとき、画像のようなエラーがでた。
non-fast-forward エラー
https://help.github.com/ja/articles/dealing-with-non-fast-forward-errors

git pull origin develop としたらどうでしょう?
(git push origin develop と同じ要領でpushではなくpullをする)

Please specify which branch you want to merge with.
「どのブランチをマージしたいか特定しろ」と書いてあるので、
ブランチを特定する必要があるということがわかります。
そして、その後に「git pull 」 と書いてあり、
既にレビュー提出で git push -u origin develop を経験していることから、 origin develop で、GitHubのレポジトリに対してdevelopブランチをpushするということは、理解されているかなと思います。
そして、今回の場合pullを使いましたが、pullはpushとは逆の動作で、
リモートからローカルに反映されていない分を取り込む、つまりマージすることを意味します。
そして、どのブランチの内容を取り込むかというしていで、 origin develop を実行しました。
origin の意味については、39回のオンライン講義でも話していますが、レポジトリのURLのショートカットになります。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?