echo "# {repo-name}" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/nonko8/{repo-name}.git
git push -u origin master
git remote add origin https://github.com/nonko8/{repo-name}.git
git push -u origin master
git push origin :branch-name
git push origin branch-name
You can initialize this repository with code from a Subversion, Mercurial, or TFS project.
git remote add origin https://github.com/nonko8/{repo-name}.git
git pull origin master
git clone https://github.com/nonko8/{repo-name}.git
git remote remove origin
git reset HEAD git reset --hard
git remote rm https://github.com/nonko8/{repo-name}.git
git push
が reject
された場合の対処方法
git push -u origin master
To https://github.com/nonko8/GitHub-Collaboration.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/nonko8/GitHub-Collaboration.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
方法1
git pull
方法2
git fetch
git merge origin/master
方法3
git fetch
git rebase origin/master
- 変更を加えたいリポジトリをフォークする
- ブランチを修正しコミットする
- リポジトリのトップへ移動し「New pull request」をクリックしてプルリクを作成する
- プルリク元とプルリク先が正しいことを確認し、問題がなければ「Create pull request」をクリックする
- コメントを入力し「Create pull request」をクリックする