Code Monkey home page Code Monkey logo

practice_social_coding's Introduction

ソーシャルコーディング

目的

githubを用いてソーシャルコーディングを体得する.

作るもの

ホームページ.随時変更アリ.

参加してもらえる方はなにをプルリクしたら良いかわからないと思うので,Issuesにあるもののどれかをやってみましょう.

やり方

  1. github(https://github.com/whitech0c0/practice_social_coding) Forkをクリック.
    (自分のgithub上にフォークされます)

  2. ローカル環境にクローンする

$ git clone https://github.com/[user_name]/practice_social_coding
  1. ブランチを作成
$ cd practice_social_coding
$ git checkout -b [branch_name]
  1. ファイル追加・修正・削除などしてから
$ git add [file_name]
$ git commit -m "[commit_message]"
  1. 自分のgithubリポジトリ(forkしたやつ)にpushする
$ git push origin [branch_name]
  1. guthubのページからPull Reauest ボタンをクリック

注意

  • 自分が作業するときは常に最新からのブランチにしよう
  • 自分のgithubリポジトリも常に最新のものにしよう( remoteにupstream追加する )

本家から最新をもってきて自分のところも最新状態にする

  1. masterブランチに切り替える
$ git checkout master
  1. リモート先(本家)を追加する
$ git remote add upstream [email protected]:whitech0c0/practice_social_coding.git
  1. 自分のローカルのmasterを最新にする
$ git pull upstream master
  1. github側も最新にする
$ git push origin master

この状態でブランチをつくると良いと思います.

Pull Request が Merge されたあとですること

  1. 自分のローカルリポジトリにある、master ブランチと Pull Requestしたブランチが古くなってるはずなので上の注意に書いてあることを確認&実行しましょう

  2. もし本家のmasterが進んだのに、自分の作業ブランチが遅れたmasterを元にしてるというのは良くないのでbranch元をやり直すためにrebaseをしておきましょう

$ git checkout [branch_name]  
$ git rebase master

※ rebaseはよくない場合がある。

  1. 2が良くない時。feature-branchに移動してmergeする(ローカルのmasterが最新の状態で)
$ git merge master
  1. ブランチを消してもよいとき(ブランチの役目が終わったとき)
$ git checkout master
$ git branch -D [branch_name]

shiritoriを続ける場合

  1. ローカルリポジトリにshiritoriブランチの作成
$ git checkout shiritori
$ git pull upstream shiritori

※最新のshiritoriブランチをpullするようにしましょう

  1. リモートリポジトリにshiritoriブランチの作成
$ git push origin shiritori

※しりとりを続けてcommitしたらpushするようにしましょう

  1. pull requestを送る場合 whitech0c0:shiritori ← ユーザー名:shiritori となるようにpull requestを送ること ※masterに送るなどブランチを間違えないようにしましょう

  2. 緊急時(なんかミスってshiritoriブランチを削除する場合)

$ git checkout master
$ git branch -d shiritori
$ git push origin :shiritori

これでローカルとリモートのshiritoriブランチを削除できる

約束ごと

  • 失敗を恐れない
  • issueとかgithubの機能をいろいろ使ってみる
  • わからないことは積極的に調べる&聞く

このREADMEも間違っている&わかりずらい箇所があると思うのでみんなで修正していきましょう.

参考資料

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.